Package org.bukkit.event.entity
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 org.bukkit.event.entity.EntityKnockbackEvent
EntityKnockbackEvent.KnockbackCause
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity
-
Constructor Summary
ConstructorDescriptionEntityKnockbackByEntityEvent
(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 org.bukkit.event.entity.EntityKnockbackEvent
getCause, getEntity, getFinalKnockback, getForce, getHandlerList, getHandlers, getKnockback, isCancelled, setCancelled, setFinalKnockback
Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntityType
Methods inherited from class org.bukkit.event.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
-