Class MenusFile
java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.MenusFile
Typed accessor for the menus YAML configuration file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetDefaultButtonLore(String name) Returns the lore lines for a named default button.getDefaultButtonName(String name) Returns the display name for a named default button (e.g.getDefaultButtonType(String name) Returns the material type string for a named default button.getMenuButtonLore(String menuKey, int buttonId) Returns the lore lines for a per-menu button.getMenuButtonName(String menuKey, int buttonId) Returns the display name for a per-menu button.getMenuButtonType(String menuKey, int buttonId) Returns the material type string for a per-menu button.Returns all menu keys defined in themenussection.getMenuTitle(String menuKey) Returns the title for the given menu key.booleanChecks whether a menu section exists for the given key.Methods inherited from class ResourceFile
getBoolean, getBoolean, getConfig, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getKeysUnderPath, getLong, getLong, getRaw, getString, getString, getStringList
-
Constructor Details
-
MenusFile
- Throws:
FileNotFoundException
-
-
Method Details
-
get
-
getMenuTitle
-
getMenuButtonName
-
getMenuButtonLore
-
getMenuButtonType
Returns the material type string for a per-menu button.- Parameters:
menuKey- the menu configuration keybuttonId- the button's local integer ID- Returns:
- the raw material type string (e.g.
DIAMOND,PLAYERHEAD-...), orBARRIERif not found
-
getDefaultButtonName
-
getDefaultButtonLore
-
getDefaultButtonType
-
hasMenu
Checks whether a menu section exists for the given key.- Parameters:
menuKey- the menu configuration key- Returns:
trueif the section exists
-
getMenuKeys
-