mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
#479: Add LivingEntity#attack, LivingEntity#swingMainHand, LivingEntity#swingOffHand
This commit is contained in:
parent
ae72ba3a43
commit
fd28180e18
1 changed files with 27 additions and 0 deletions
|
@ -458,6 +458,33 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
*/
|
*/
|
||||||
boolean hasAI();
|
boolean hasAI();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes this entity attack the given entity with a melee attack.
|
||||||
|
*
|
||||||
|
* Attack damage is calculated by the server from the attributes and
|
||||||
|
* equipment of this mob, and knockback is applied to {@code target} as
|
||||||
|
* appropriate.
|
||||||
|
*
|
||||||
|
* @param target entity to attack.
|
||||||
|
*/
|
||||||
|
public void attack(@NotNull Entity target);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes this entity swing their main hand.
|
||||||
|
*
|
||||||
|
* This method does nothing if this entity does not have an animation for
|
||||||
|
* swinging their main hand.
|
||||||
|
*/
|
||||||
|
public void swingMainHand();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes this entity swing their off hand.
|
||||||
|
*
|
||||||
|
* This method does nothing if this entity does not have an animation for
|
||||||
|
* swinging their off hand.
|
||||||
|
*/
|
||||||
|
public void swingOffHand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set if this entity will be subject to collisions other entities.
|
* Set if this entity will be subject to collisions other entities.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue