Package org.bukkit.event.entity
Enum Class EntityKnockbackEvent.KnockbackCause
java.lang.Object
java.lang.Enum<EntityKnockbackEvent.KnockbackCause>
org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause
- All Implemented Interfaces:
Serializable
,Comparable<EntityKnockbackEvent.KnockbackCause>
,Constable
- Enclosing class:
EntityKnockbackEvent
public static enum EntityKnockbackEvent.KnockbackCause
extends Enum<EntityKnockbackEvent.KnockbackCause>
An enum to specify the cause of the knockback.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionKnockback caused by non-entity damage.Knockback caused by an attacking entity.Knockback caused by an explosion.Knockback caused by the target blocking with a shield.Knockback caused by a sweeping attack.Knockback with an unknown cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static EntityKnockbackEvent.KnockbackCause[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DAMAGE
Knockback caused by non-entity damage. -
ENTITY_ATTACK
Knockback caused by an attacking entity. -
EXPLOSION
Knockback caused by an explosion. -
SHIELD_BLOCK
Knockback caused by the target blocking with a shield. -
SWEEP_ATTACK
Knockback caused by a sweeping attack. -
UNKNOWN
Knockback with an unknown cause.
-
-
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
-