Package me.efekos.simpler.menu
Class MenuData
java.lang.Object
me.efekos.simpler.menu.MenuData
Represents a temporary data for communication between any code and
Menu classes.-
Constructor Summary
ConstructorsConstructorDescriptionMenuData(org.bukkit.entity.Player owner) Returns thePlayerwho this data belongs to -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a menu to the menu history of this data.Gets a value from the stored data, using the key given.Returns a menuStackused to store the history of menusownervisited.org.bukkit.entity.PlayergetOwner()Returns thePlayerwho owns this data.lastMenu()Removes the last menu from menu history and returns it.voidSets a value for the key given.
-
Constructor Details
-
MenuData
public MenuData(org.bukkit.entity.Player owner) Returns thePlayerwho this data belongs to- Parameters:
owner- Final owner of this data.
-
-
Method Details
-
getMenuHistory
Returns a menuStackused to store the history of menusownervisited.- Returns:
- A history of the
Menus visited by the owner.
-
get
Gets a value from the stored data, using the key given.- Parameters:
key- Key to search for.- Returns:
- Whatever found.
-
set
Sets a value for the key given.- Parameters:
key- Key to use.value- Value to enter.
-
getOwner
public org.bukkit.entity.Player getOwner()Returns thePlayerwho owns this data.- Returns:
- Owner of this data.
-
lastMenu
Removes the last menu from menu history and returns it.- Returns:
- Last menu the owner visited.
-