mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
Fix client-side death bug (#438)
This commit is contained in:
parent
2673e4de7f
commit
06f2a9c674
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user