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.PlayerMethod to get the player that clicked an option.intMethod to get the click position in the menu.voidsetWillClose(boolean close) Method to set if the menu will close after this event.voidsetWillDestroy(boolean destroy) Method to set if the menu will destroy after this event.booleanMethod to get if the menu will close after this event.booleanMethod to get if the menu will destroy after this event.
-
Constructor Details
-
OptionClickEvent
Class constructor.- Parameters:
player- the eventPlayerposition- 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
Playerthat 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:
Trueif the menu will close
-
willDestroy
public boolean willDestroy()Method to get if the menu will destroy after this event.- Returns:
Trueif 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
-