Enum CustomBlockDataEvent.Reason
java.lang.Object
java.lang.Enum<CustomBlockDataEvent.Reason>
com.jeff_media.customblockdata.events.CustomBlockDataEvent.Reason
- All Implemented Interfaces:
Serializable,Comparable<CustomBlockDataEvent.Reason>,java.lang.constant.Constable
- Enclosing class:
- CustomBlockDataEvent
Represents the reason for a change of CustomBlockData
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a block being broken by a playerRepresents a block being replaced by a new block (for example STONE being placed into a TALL_GRASS)Represents a block being destroyed by fireRepresents a block being changed by an entity.Represents a block being destroyed by an explosionRepresents a block being destroyed by melting, etc.Represents a block being changed by fertilizing a given block with bonemeal.Deprecated.Draft APIRepresents a block being moved by a pistonRepresents a block being changed by a structure (Sapling -> Tree, Mushroom -> Huge Mushroom), naturally or using bonemeal. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of Bukkit Event classes that are associated with this Reasonstatic CustomBlockDataEvent.ReasonReturns the enum constant of this type with the specified name.static CustomBlockDataEvent.Reason[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BLOCK_BREAK
Represents a block being broken by a player- See Also:
-
BLOCK_PLACE
Represents a block being replaced by a new block (for example STONE being placed into a TALL_GRASS)- See Also:
-
EXPLOSION
Represents a block being destroyed by an explosion- See Also:
-
PISTON
Represents a block being moved by a piston -
BURN
Represents a block being destroyed by fire- See Also:
-
ENTITY_CHANGE_BLOCK
Represents a block being changed by an entity. AnEntityChangeBlockEventwill only trigger removal of CustomBlockData when the block's material changes.Example: When a player steps on REDSTONE_ORE, an EntityChangeBlockEvent is called because the BlockState's "lit" tag changes from false to true. However, this will not lead to removal of CustomBlockData because the block's material is still REDSTONE_ORE.
-
FADE
Represents a block being destroyed by melting, etc. ABlockFadeEventwill only trigger removal of CustomBlockData when the block's material changes. The event will not be called for fire burning out.- See Also:
-
STRUCTURE_GROW
Represents a block being changed by a structure (Sapling -> Tree, Mushroom -> Huge Mushroom), naturally or using bonemeal.- See Also:
-
FERTILIZE
Represents a block being changed by fertilizing a given block with bonemeal.- See Also:
-
LEAVES_DECAY
Deprecated.Draft APIRepresents leaves decaying. This is currently not called because of performance reasons. In future versions, there will be a method to enable listening to this. -
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getApplicableEvents
Gets a list of Bukkit Event classes that are associated with this Reason
-