mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
Cleaned up EntityEventPacket handling
This commit is contained in:
@@ -3635,10 +3635,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
if($source->isCancelled()){
|
||||
return;
|
||||
}elseif($this->getLastDamageCause() === $source and $this->spawned){
|
||||
$pk = new EntityEventPacket();
|
||||
$pk->entityRuntimeId = $this->id;
|
||||
$pk->event = EntityEventPacket::HURT_ANIMATION;
|
||||
$this->dataPacket($pk);
|
||||
$this->broadcastEntityEvent(EntityEventPacket::HURT_ANIMATION);
|
||||
|
||||
if($this->isSurvival()){
|
||||
$this->exhaust(0.3, PlayerExhaustEvent::CAUSE_DAMAGE);
|
||||
|
Reference in New Issue
Block a user