mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
@ -1679,13 +1679,13 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
}
|
||||
|
||||
$entity->attack($ev);
|
||||
$this->broadcastAnimation(new ArmSwingAnimation($this), $this->getViewers());
|
||||
|
||||
$soundPos = $entity->getPosition()->add(0, $entity->size->getHeight() / 2, 0);
|
||||
if($ev->isCancelled()){
|
||||
$this->getWorld()->addSound($soundPos, new EntityAttackNoDamageSound());
|
||||
return false;
|
||||
}
|
||||
$this->broadcastAnimation(new ArmSwingAnimation($this), $this->getViewers());
|
||||
$this->getWorld()->addSound($soundPos, new EntityAttackSound());
|
||||
|
||||
if($ev->getModifier(EntityDamageEvent::MODIFIER_CRITICAL) > 0 and $entity instanceof Living){
|
||||
|
Reference in New Issue
Block a user