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
ConstructorDescriptionMenuData
(org.bukkit.entity.Player owner) Returns thePlayer
who this data belongs to -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a menu to the menu history of this data.Gets a value from the stored data, using the key given.Returns a menuStack
used to store the history of menusowner
visited.org.bukkit.entity.Player
getOwner()
Returns thePlayer
who owns this data.lastMenu()
Removes the last menu from menu history and returns it.void
Sets a value for the key given.
-
Constructor Details
-
MenuData
public MenuData(org.bukkit.entity.Player owner) Returns thePlayer
who this data belongs to- Parameters:
owner
- Final owner of this data.
-
-
Method Details
-
getMenuHistory
Returns a menuStack
used to store the history of menusowner
visited.- Returns:
- A history of the
Menu
s 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 thePlayer
who 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.
-