mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Living: Despawn in endDeathAnimation()
this removes the necessity for the player to do this.
This commit is contained in:
parent
f7f7be896e
commit
b22a2ef914
@ -3625,10 +3625,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function onDeathUpdate(int $tickDiff) : bool{
|
protected function onDeathUpdate(int $tickDiff) : bool{
|
||||||
if(parent::onDeathUpdate($tickDiff)){
|
parent::onDeathUpdate($tickDiff);
|
||||||
$this->despawnFromAll(); //non-player entities rely on close() to do this for them
|
|
||||||
}
|
|
||||||
|
|
||||||
return false; //never flag players for despawn
|
return false; //never flag players for despawn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -665,7 +665,7 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function endDeathAnimation() : void{
|
protected function endDeathAnimation() : void{
|
||||||
//TODO
|
$this->despawnFromAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function entityBaseTick(int $tickDiff = 1) : bool{
|
public function entityBaseTick(int $tickDiff = 1) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user