Class EntityKnockbackByEntityEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityKnockbackEvent
org.bukkit.event.entity.EntityKnockbackByEntityEvent
- All Implemented Interfaces:
Cancellable
Called when an entity receives knockback from another entity.
-
Nested Class Summary
Nested classes/interfaces inherited from class EntityKnockbackEvent
EntityKnockbackEvent.KnockbackCauseNested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class EntityEvent
entity -
Constructor Summary
ConstructorsConstructorDescriptionEntityKnockbackByEntityEvent(LivingEntity entity, Entity source, EntityKnockbackEvent.KnockbackCause cause, double force, Vector rawKnockback, Vector knockback) -
Method Summary
Modifier and TypeMethodDescriptionGet the entity that has caused knockback to the defender.Methods inherited from class EntityKnockbackEvent
getCause, getEntity, getFinalKnockback, getForce, getHandlerList, getHandlers, getKnockback, isCancelled, setCancelled, setFinalKnockbackMethods inherited from class EntityEvent
getEntityTypeMethods inherited from class Event
getEventName, isAsynchronous
-
Constructor Details
-
EntityKnockbackByEntityEvent
public EntityKnockbackByEntityEvent(@NotNull LivingEntity entity, @NotNull Entity source, @NotNull EntityKnockbackEvent.KnockbackCause cause, double force, @NotNull Vector rawKnockback, @NotNull Vector knockback)
-
-
Method Details
-
getSourceEntity
Get the entity that has caused knockback to the defender.- Returns:
- entity that caused knockback
-