Class IconMenu.OptionClickEvent

java.lang.Object
me.gigawartrex.smalladditions.helpers.IconMenu.OptionClickEvent
Enclosing class:
IconMenu

public class IconMenu.OptionClickEvent extends Object
Class representing an option click event.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OptionClickEvent(org.bukkit.entity.Player player, int position, String name)
    Class constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OptionClickEvent

      public OptionClickEvent(org.bukkit.entity.Player player, int position, String name)
      Class constructor.
      Parameters:
      player - the event Player
      position - the clicked position in the inventory
      name - 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

      public String 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