Fix client-side death bug (#438)

This commit is contained in:
Irish 2017-03-20 08:21:58 -04:00 committed by Dylan K. Taylor
parent 2673e4de7f
commit 06f2a9c674

View File

@ -3340,15 +3340,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->dataPacket($pk);
}
public function setHealth($amount){
parent::setHealth($amount);
if($this->spawned === true){
$pk = new SetHealthPacket();
$pk->health = $this->getHealth();
$this->dataPacket($pk);
}
}
public function attack($damage, EntityDamageEvent $source){
if(!$this->isAlive()){
return;