Class GuideHistory
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.guide.GuideHistory
- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
ConstructorDescriptionGuideHistory
(PlayerProfile profile) This creates a newGuideHistory
for the givenPlayerProfile
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method adds aItemGroup
to thisGuideHistory
.void
add
(SlimefunItem item) This method stores the givenSlimefunItem
in thisGuideHistory
.void
This method stores the given search term in thisGuideHistory
.void
This method adds aItemStack
to thisGuideHistory
.void
clear()
This method will clear thisGuideHistory
and remove all entries.int
This returns the current main menu page of thisGuideHistory
void
This method opens the previous entry to the associatedPlayerProfile
.void
This method opens the last opened entry to the associatedPlayerProfile
of thisGuideHistory
.void
setMainMenuPage
(int page) This method sets the page of the main menu of thisGuideHistory
int
size()
This returns the amount of elements in thisGuideHistory
.
-
Constructor Details
-
GuideHistory
This creates a newGuideHistory
for the givenPlayerProfile
- Parameters:
profile
- ThePlayerProfile
thisGuideHistory
was made for
-
-
Method Details
-
clear
public void clear()This method will clear thisGuideHistory
and remove all entries. -
setMainMenuPage
public void setMainMenuPage(int page) This method sets the page of the main menu of thisGuideHistory
- Parameters:
page
- The current page of the main menu that should be stored
-
getMainMenuPage
public int getMainMenuPage()This returns the current main menu page of thisGuideHistory
- Returns:
- The main menu page of this
GuideHistory
-
add
This method adds aItemGroup
to thisGuideHistory
. Should theItemGroup
already be the last element in thisGuideHistory
, then the entry will be overridden with the new page.- Parameters:
itemGroup
- TheItemGroup
that should be added to thisGuideHistory
page
- The current page of theItemGroup
that should be stored
-
add
This method adds aItemStack
to thisGuideHistory
. Should theItemStack
already be the last element in thisGuideHistory
, then the entry will be overridden with the new page.- Parameters:
item
- TheItemStack
that should be added to thisGuideHistory
page
- The current page of the recipes of thisItemStack
-
add
This method stores the givenSlimefunItem
in thisGuideHistory
.- Parameters:
item
- TheSlimefunItem
that should be added to thisGuideHistory
-
add
This method stores the given search term in thisGuideHistory
.- Parameters:
searchTerm
- The term that thePlayer
searched for
-
size
public int size()This returns the amount of elements in thisGuideHistory
.- Returns:
- The size of this
GuideHistory
-
openLastEntry
This method opens the last opened entry to the associatedPlayerProfile
of thisGuideHistory
.- Parameters:
guide
- TheSlimefunGuideImplementation
to use
-
goBack
This method opens the previous entry to the associatedPlayerProfile
. More precisely, it will remove the last entry and open the second-last entry to thePlayer
. It can be thought of as a "back" button. Since that is what this is used for.- Parameters:
guide
- TheSlimefunGuideImplementation
to use
-