Guide-API

Guide-API

76M Downloads

Question : Hidding pages

Frinn38 opened this issue ยท 5 comments

commented

Is it actually possible to make some pages hidden until the player have done a specific action (for example taking an advancement).
I seen in the code a bool "cansee" in the IPage interface but I have no clue how to use it or if it can be used to willingly hide pages.

commented

Thanks for your fast answer, I tried to create a class that implements IPage and override the boolean cansee but it does not seem to work. I also note that there is the Page class that override cansee to true.
I don't know how override this method that is already overriden and all my tried fails.
Sorry to ask you but I am a begginer in java dev and a little help would be welcome.

commented

You just... Override it?

commented

I tried this :
public class NewPage implements IPage {
@OverRide
public boolean canSee(Book book, CategoryAbstract category, EntryAbstract entry, EntityPlayer player, ItemStack bookStack, GuiEntry guiEntry) {
return false;
}
}

But it change nothing.
I also tried :

public class NewPage extends Page {
@OverRide
public boolean canSee(Book book, CategoryAbstract category, EntryAbstract entry, EntityPlayer player, ItemStack bookStack, GuiEntry guiEntry) {
return false;
}
}

But nothing again.

commented

Override the method in your IPage.

commented

finally i'll give up to use this method, too complicated for me. But thanks tohave answer me even if this repo is not made for help =)