Package io.papermc.paper.event.entity
Enum Class EntityKnockbackEvent.Cause
- All Implemented Interfaces:
Serializable
,Comparable<EntityKnockbackEvent.Cause>
,Constable
- Enclosing class:
EntityKnockbackEvent
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.A generic push.Knockback caused by the target blocking with a shield.Knockback caused by a sweeping attack.Knockback with an unknown cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityKnockbackEvent.Cause
Returns the enum constant of this class with the specified name.static EntityKnockbackEvent.Cause[]
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. -
PUSH
A generic push. -
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
-