Enum ItemEnchantmentTrigger
- java.lang.Object
-
- java.lang.Enum<ItemEnchantmentTrigger>
-
- me.boboballoon.enhancedenchantments.enchantment.ItemEnchantmentTrigger
-
- All Implemented Interfaces:
Serializable
,Comparable<ItemEnchantmentTrigger>
,EnchantmentTrigger
,ItemTrigger
public enum ItemEnchantmentTrigger extends Enum<ItemEnchantmentTrigger> implements ItemTrigger
Represents all valid enchantment triggers for item related enchantments
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ON_BLOCK_BREAK
Will fire when the itemstack is used to break a block, event will return BlockBreakEventON_DAMAGE_DEALT
Will fire when the itemstack is used to hurt another entity, event will return EntityDamageByEntityEventON_ENTITY_KILLED
Will fire when the itemstack is used to kill another entity, event will return EntityDeathEvent
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ItemEnchantmentTrigger
valueOf(String name)
Returns the enum constant of this type with the specified name.static ItemEnchantmentTrigger[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ON_BLOCK_BREAK
public static final ItemEnchantmentTrigger ON_BLOCK_BREAK
Will fire when the itemstack is used to break a block, event will return BlockBreakEvent- See Also:
BlockBreakEvent
-
ON_DAMAGE_DEALT
public static final ItemEnchantmentTrigger ON_DAMAGE_DEALT
Will fire when the itemstack is used to hurt another entity, event will return EntityDamageByEntityEvent- See Also:
EntityDamageByEntityEvent
-
ON_ENTITY_KILLED
public static final ItemEnchantmentTrigger ON_ENTITY_KILLED
Will fire when the itemstack is used to kill another entity, event will return EntityDeathEvent- See Also:
EntityDeathEvent
-
-
Method Detail
-
values
public static ItemEnchantmentTrigger[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ItemEnchantmentTrigger c : ItemEnchantmentTrigger.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ItemEnchantmentTrigger valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
-