Class GuideHistory
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.guide.GuideHistory
- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGuideHistory(PlayerProfile profile) This creates a newGuideHistoryfor the givenPlayerProfile -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method adds aItemGroupto thisGuideHistory.voidadd(SlimefunItem item) This method stores the givenSlimefunItemin thisGuideHistory.voidThis method stores the given search term in thisGuideHistory.voidThis method adds aItemStackto thisGuideHistory.voidclear()This method will clear thisGuideHistoryand remove all entries.intThis returns the current main menu page of thisGuideHistoryvoidThis method opens the previous entry to the associatedPlayerProfile.voidThis method opens the last opened entry to the associatedPlayerProfileof thisGuideHistory.voidsetMainMenuPage(int page) This method sets the page of the main menu of thisGuideHistoryintsize()This returns the amount of elements in thisGuideHistory.
-
Constructor Details
-
GuideHistory
This creates a newGuideHistoryfor the givenPlayerProfile- Parameters:
profile- ThePlayerProfilethisGuideHistorywas made for
-
-
Method Details
-
clear
public void clear()This method will clear thisGuideHistoryand 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 aItemGroupto thisGuideHistory. Should theItemGroupalready be the last element in thisGuideHistory, then the entry will be overridden with the new page.- Parameters:
itemGroup- TheItemGroupthat should be added to thisGuideHistorypage- The current page of theItemGroupthat should be stored
-
add
This method adds aItemStackto thisGuideHistory. Should theItemStackalready be the last element in thisGuideHistory, then the entry will be overridden with the new page.- Parameters:
item- TheItemStackthat should be added to thisGuideHistorypage- The current page of the recipes of thisItemStack
-
add
This method stores the givenSlimefunItemin thisGuideHistory.- Parameters:
item- TheSlimefunItemthat should be added to thisGuideHistory
-
add
This method stores the given search term in thisGuideHistory.- Parameters:
searchTerm- The term that thePlayersearched 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 associatedPlayerProfileof thisGuideHistory.- Parameters:
guide- TheSlimefunGuideImplementationto 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- TheSlimefunGuideImplementationto use
-