Package dev.aurelium.slate.menu
Class ActiveMenu
java.lang.Object
dev.aurelium.slate.menu.ActiveMenu
- Direct Known Subclasses:
EmptyActiveMenu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ActiveMenugetContextGroups(String templateName) intGets the current page of the menu, 0 is the first page@NotNull StringGets a format from the menu's formats, returns the key if the format does not exist@Nullable ObjectgetItemOption(String itemName, String key) getItemOption(String itemName, String key, Object def) getName()<T> T<T> T@Nullable ObjectgetProperty(String name) getProperty(String name, Object def) intGets the total number of pages in the menuvoidreload()voidsetCooldown(String itemName, int cooldown) voidHides or shows an item in the current menu, will not delete the item in configs.<T> voidsetPositionProvider(String templateName, T context, PositionProvider provider) voidsetProperty(String name, Object value)
-
Constructor Details
-
Method Details
-
empty
-
getName
-
setHidden
Hides or shows an item in the current menu, will not delete the item in configs. Will not take effect unless the menu is reloaded.- Parameters:
itemName- The name of the item to hide
-
getCurrentPage
public int getCurrentPage()Gets the current page of the menu, 0 is the first page- Returns:
- The current page number, 0 if there is no pagination set up
-
getTotalPages
public int getTotalPages()Gets the total number of pages in the menu- Returns:
- The total number of pages, 1 if there is no pagination set up
-
getProperty
-
getProperty
-
getProperties
-
setProperty
-
reload
public void reload() -
setCooldown
-
getOption
-
getOption
-
getOption
-
getOption
-
getItemOption
-
getItemOption
-
getComponents
-
getFormats
-
getFormat
Gets a format from the menu's formats, returns the key if the format does not exist- Parameters:
key- The key of the format- Returns:
- The format, or the key if the format does not exist
-
setPositionProvider
-
getContextGroups
-