Package me.efekos.simpler.items
Enum Class HandleType
- All Implemented Interfaces:
Serializable
,Comparable<HandleType>
,Constable
Represents the type of an event handler method annotated with
HandleEvent
. Which event you should use is written
to each member.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionNeeded event:PlayerItemBreakEvent
.Needed event:BlockBreakEvent
.Needed event:PlayerItemConsumeEvent
.Needed event:PlayerItemDamageEvent
.Needed event:PlayerDropItemEvent
.Needed event:PlayerItemHeldEvent
.Needed event:PlayerItemHeldEvent
.Needed event:PlayerInteractEvent
.Needed event:PlayerInteractEvent
.Needed event:PlayerInteractEvent
.Needed event:PlayerItemMendEvent
.Needed event:EntityPickupItemEvent
.Needed event:PlayerInteractEvent
.Needed event:PlayerInteractEvent
.Needed event:PlayerInteractEvent
. -
Method Summary
Modifier and TypeMethodDescriptionstatic HandleType
Returns the enum constant of this class with the specified name.static HandleType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PICKUP
Needed event:EntityPickupItemEvent
. Fires when a player picks this item up. -
DROP
Needed event:PlayerDropItemEvent
. Fires when a player drops this item. -
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
Needed event:PlayerInteractEvent
. Fires when a player right-clicks this item, no matter if they clicked to a block or air -
LEFT_CLICK_BLOCK
Needed event:PlayerInteractEvent
. Fires when a player left-clicks to a block using this item. -
RIGHT_CLICK_BLOCK
Needed event:PlayerInteractEvent
. Fires when a player right-clicks to a block using this item. -
BREAK_BLOCK
Needed event:BlockBreakEvent
. Fires when a player breaks a block using this item. -
BREAK
Needed event:PlayerItemBreakEvent
. Fires when a player breaks this item (only tools can fire this event.) -
DAMAGE
Needed event:PlayerItemDamageEvent
. Fires when a player damages this item (only tools can fire this event.) -
CONSUME
Needed event:PlayerItemConsumeEvent
. Fires when a player eats/drinks this item (only foods and potions can fire this event.) -
MEND
Needed event:PlayerItemMendEvent
. Fires when the durability of this item changes because of the Mending enchantment. -
HOLD_ON
Needed event:PlayerItemHeldEvent
. Fires when a player switches his main item from something else to this item. -
LEFT_CLICK_AIR
Needed event:PlayerInteractEvent
. Fires when a player left-clicks to air using this item. -
RIGHT_CLICK_AIR
Needed event:PlayerInteractEvent
. Fires when a player right-clicks to air using this item. -
HOLD_OFF
Needed event:PlayerItemHeldEvent
. Fires when a player switches his main item from this item to something else.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-