Class IconMenu.OptionClickEvent
java.lang.Object
me.gigawartrex.smalladditions.helpers.IconMenu.OptionClickEvent
- Enclosing class:
- IconMenu
Class representing an option click event.
-
Constructor Summary
ConstructorsConstructorDescriptionOptionClickEvent
(org.bukkit.entity.Player player, int position, String name) Class constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Method to get the menu name.org.bukkit.entity.Player
Method to get the player that clicked an option.int
Method to get the click position in the menu.void
setWillClose
(boolean close) Method to set if the menu will close after this event.void
setWillDestroy
(boolean destroy) Method to set if the menu will destroy after this event.boolean
Method to get if the menu will close after this event.boolean
Method to get if the menu will destroy after this event.
-
Constructor Details
-
OptionClickEvent
Class constructor.- Parameters:
player
- the eventPlayer
position
- the clicked position in the inventoryname
- the name of the inventory
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Method to get the player that clicked an option.- Returns:
- the
Player
that clicked an option
-
getPosition
public int getPosition()Method to get the click position in the menu.- Returns:
- the click position starting at 0
-
getName
Method to get the menu name.- Returns:
- the name of the menu
-
willClose
public boolean willClose()Method to get if the menu will close after this event.- Returns:
True
if the menu will close
-
willDestroy
public boolean willDestroy()Method to get if the menu will destroy after this event.- Returns:
True
if the menu will destroy
-
setWillClose
public void setWillClose(boolean close) Method to set if the menu will close after this event.- Parameters:
close
- if the menu should close
-
setWillDestroy
public void setWillDestroy(boolean destroy) Method to set if the menu will destroy after this event.- Parameters:
destroy
- if the menu should destroy
-