mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
Send spawn position after respawn on death, fixes #2976
This commit is contained in:
parent
9ec609d025
commit
49f34ec524
@ -731,6 +731,15 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
if($this->server->getUpdater()->hasUpdate() and $this->hasPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE)){
|
||||
$this->server->getUpdater()->showPlayerUpdate($this);
|
||||
}
|
||||
|
||||
if($this->getHealth() <= 0){
|
||||
$pk = new RespawnPacket();
|
||||
$pos = $this->getSpawn();
|
||||
$pk->x = $pos->x;
|
||||
$pk->y = $pos->y;
|
||||
$pk->z = $pos->z;
|
||||
$this->dataPacket($pk->setChannel(Network::CHANNEL_WORLD_EVENTS));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user