Player: fixed getting re-banned on rejoin after unban from hardcore death

closes #2175
This commit is contained in:
Dylan K. Taylor 2021-10-30 16:58:03 +01:00
parent 69952ae2af
commit 141fbde660
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -1117,7 +1117,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
}
if($this->getHealth() <= 0){
$this->respawn();
$this->actuallyRespawn();
}
}
@ -3891,6 +3891,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
return;
}
$this->actuallyRespawn();
}
protected function actuallyRespawn() : void{
$ev = new PlayerRespawnEvent($this, $this->getSpawn());
$ev->call();