Package cn.nukkit.event.entity
Class EntityDamageByEntityEvent
java.lang.Object
cn.nukkit.event.Event
cn.nukkit.event.entity.EntityEvent
cn.nukkit.event.entity.EntityDamageEvent
cn.nukkit.event.entity.EntityDamageByEntityEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
EntityDamageByChildEntityEvent
- Author:
- MagicDroidX (Nukkit Project)
-
Nested Class Summary
Nested classes/interfaces inherited from class cn.nukkit.event.entity.EntityDamageEvent
EntityDamageEvent.DamageCause, EntityDamageEvent.DamageModifier
-
Field Summary
Fields inherited from class cn.nukkit.event.entity.EntityEvent
entity
-
Constructor Summary
ConstructorDescriptionEntityDamageByEntityEvent
(Entity damager, Entity entity, EntityDamageEvent.DamageCause cause, float damage) EntityDamageByEntityEvent
(Entity damager, Entity entity, EntityDamageEvent.DamageCause cause, float damage, float knockBack) EntityDamageByEntityEvent
(Entity damager, Entity entity, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Float> modifiers) EntityDamageByEntityEvent
(Entity damager, Entity entity, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Float> modifiers, float knockBack) EntityDamageByEntityEvent
(Entity damager, Entity entity, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Float> modifiers, float knockBack, Enchantment[] enchantments) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAttackerModifiers
(Entity damager) float
void
setKnockBack
(float knockBack) Methods inherited from class cn.nukkit.event.entity.EntityDamageEvent
addSideEffects, addSideEffects, canBeReducedByArmor, getAttackCooldown, getCause, getDamage, getDamage, getFinalDamage, getHandlers, getOriginalDamage, getOriginalDamage, getSideEffects, isApplicable, setAttackCooldown, setDamage, setDamage, setSideEffects, setSideEffects
Methods inherited from class cn.nukkit.event.entity.EntityEvent
getEntity
Methods inherited from class cn.nukkit.event.Event
getEventName, isCancelled, setCancelled, setCancelled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.event.Cancellable
isCancelled, setCancelled, setCancelled
-
Constructor Details
-
EntityDamageByEntityEvent
public EntityDamageByEntityEvent(@Nonnull Entity damager, @Nonnull Entity entity, @Nonnull EntityDamageEvent.DamageCause cause, float damage) -
EntityDamageByEntityEvent
public EntityDamageByEntityEvent(@Nonnull Entity damager, @Nonnull Entity entity, @Nonnull EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Float> modifiers) -
EntityDamageByEntityEvent
public EntityDamageByEntityEvent(@Nonnull Entity damager, @Nonnull Entity entity, @Nonnull EntityDamageEvent.DamageCause cause, float damage, float knockBack) -
EntityDamageByEntityEvent
public EntityDamageByEntityEvent(@Nonnull Entity damager, @Nonnull Entity entity, @Nonnull EntityDamageEvent.DamageCause cause, @Nonnull Map<EntityDamageEvent.DamageModifier, Float> modifiers, float knockBack) -
EntityDamageByEntityEvent
@Since("FUTURE") public EntityDamageByEntityEvent(@Nonnull Entity damager, @Nonnull Entity entity, @Nonnull EntityDamageEvent.DamageCause cause, @Nonnull Map<EntityDamageEvent.DamageModifier, Float> modifiers, float knockBack, @Nullable Enchantment[] enchantments)
-
-
Method Details
-
addAttackerModifiers
-
getDamager
-
getKnockBack
public float getKnockBack() -
setKnockBack
public void setKnockBack(float knockBack) -
getWeaponEnchantments
-