Enum Class HandleType

java.lang.Object
java.lang.Enum<HandleType>
me.efekos.simpler.items.HandleType
All Implemented Interfaces:
Serializable, Comparable<HandleType>, Constable

public enum HandleType extends Enum<HandleType>
Represents the type of an event handler method annotated with HandleEvent. Which event you should use is written to each member.
  • Enum Constant Details

    • PICKUP

      public static final HandleType PICKUP
      Needed event: EntityPickupItemEvent. Fires when a player picks this item up.
    • DROP

      public static final HandleType DROP
      Needed event: PlayerDropItemEvent. Fires when a player drops this item.
    • LEFT_CLICK

      public static final HandleType LEFT_CLICK
      Needed event: PlayerInteractEvent. Fires when a player left-clicks this item, no matter if they clicked to a block or air
    • RIGHT_CLICK

      public static final HandleType RIGHT_CLICK
      Needed event: PlayerInteractEvent. Fires when a player right-clicks this item, no matter if they clicked to a block or air
    • LEFT_CLICK_BLOCK

      public static final HandleType LEFT_CLICK_BLOCK
      Needed event: PlayerInteractEvent. Fires when a player left-clicks to a block using this item.
    • RIGHT_CLICK_BLOCK

      public static final HandleType RIGHT_CLICK_BLOCK
      Needed event: PlayerInteractEvent. Fires when a player right-clicks to a block using this item.
    • BREAK_BLOCK

      public static final HandleType BREAK_BLOCK
      Needed event: BlockBreakEvent. Fires when a player breaks a block using this item.
    • BREAK

      public static final HandleType BREAK
      Needed event: PlayerItemBreakEvent. Fires when a player breaks this item (only tools can fire this event.)
    • DAMAGE

      public static final HandleType DAMAGE
      Needed event: PlayerItemDamageEvent. Fires when a player damages this item (only tools can fire this event.)
    • CONSUME

      public static final HandleType CONSUME
      Needed event: PlayerItemConsumeEvent. Fires when a player eats/drinks this item (only foods and potions can fire this event.)
    • MEND

      public static final HandleType MEND
      Needed event: PlayerItemMendEvent. Fires when the durability of this item changes because of the Mending enchantment.
    • HOLD_ON

      public static final HandleType HOLD_ON
      Needed event: PlayerItemHeldEvent. Fires when a player switches his main item from something else to this item.
    • LEFT_CLICK_AIR

      public static final HandleType LEFT_CLICK_AIR
      Needed event: PlayerInteractEvent. Fires when a player left-clicks to air using this item.
    • RIGHT_CLICK_AIR

      public static final HandleType RIGHT_CLICK_AIR
      Needed event: PlayerInteractEvent. Fires when a player right-clicks to air using this item.
    • HOLD_OFF

      public static final HandleType HOLD_OFF
      Needed event: PlayerItemHeldEvent. Fires when a player switches his main item from this item to something else.
  • Method Details

    • values

      public static HandleType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HandleType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null