Class MapMenuManager
java.lang.Object
studio.magemonkey.codex.mccore.gui.MapMenuManager
Handles setting up
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapDatagetActiveMenuData(org.bukkit.entity.Player player) Retrieves the map menu a player is looking at, if any.static MapDataq Creates a map item for the given map menustatic voidregisterMenu(String key, MapMenu root) Creates a new menu view using the given menu as the root.static voidsendBack(org.bukkit.entity.Player player) Sends a player back one level in their current menu chain.static voidSends a player forward one level to the given menu.
-
Constructor Details
-
MapMenuManager
public MapMenuManager()
-
-
Method Details
-
getData
-
registerMenu
-
getActiveMenuData
Retrieves the map menu a player is looking at, if any. When a player is not holding a map menu, this will instead return null.- Parameters:
player- player to get the menu for- Returns:
- active map menu or null if not found
-
sendBack
public static void sendBack(org.bukkit.entity.Player player) Sends a player back one level in their current menu chain.- Parameters:
player- player to send back to the previous menu
-
sendNext
Sends a player forward one level to the given menu. If the player is not currently at the parent menu of the new one, this will not do anything. You must follow the chain of menus for a given hierarchy.- Parameters:
player- player to send back to the previous menu
-