mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
SPIGOT-6779: Fix LivingEntity#attack for Player entities
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
9e3a0e859f
commit
fda316b6eb
1 changed files with 5 additions and 1 deletions
|
@ -651,7 +651,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||
Preconditions.checkArgument(target != null, "target == null");
|
||||
Preconditions.checkState(!getHandle().generation, "Cannot attack during world generation");
|
||||
|
||||
getHandle().attackEntity(((CraftEntity) target).getHandle());
|
||||
if (getHandle() instanceof EntityHuman) {
|
||||
((EntityHuman) getHandle()).attack(((CraftEntity) target).getHandle());
|
||||
} else {
|
||||
getHandle().attackEntity(((CraftEntity) target).getHandle());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue