mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Show death message on death screen (#5386)
This commit is contained in:
@ -743,9 +743,9 @@ class NetworkSession{
|
||||
$this->setHandler(new InGamePacketHandler($this->player, $this, $this->invManager));
|
||||
}
|
||||
|
||||
public function onServerDeath() : void{
|
||||
public function onServerDeath(Translatable|string $deathMessage) : void{
|
||||
if($this->handler instanceof InGamePacketHandler){ //TODO: this is a bad fix for pre-spawn death, this shouldn't be reachable at all at this stage :(
|
||||
$this->setHandler(new DeathPacketHandler($this->player, $this, $this->invManager ?? throw new AssumptionFailedError()));
|
||||
$this->setHandler(new DeathPacketHandler($this->player, $this, $this->invManager ?? throw new AssumptionFailedError(), $deathMessage));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user