37 public function __construct(
44 public function setUp() :
void{
46 $this->player->getOffsetPosition($this->player->getSpawn()),
47 RespawnPacket::SEARCHING_FOR_SPAWN,
48 $this->player->getId()
54 $language = $this->player->getLanguage();
55 if(!$this->player->getServer()->isLanguageForced()){
56 [$message, $parameters] = $this->session->prepareClientTranslatableMessage($this->deathMessage);
58 $message = $language->translate($this->deathMessage);
61 $message = $this->deathMessage;
67 if($packet->action === PlayerAction::RESPAWN){
68 $this->player->respawn();
76 $this->inventoryManager->onClientRemoveWindow($packet->windowId);
81 if($packet->respawnState === RespawnPacket::CLIENT_READY_TO_SPAWN){
83 $this->player->getOffsetPosition($this->player->getSpawn()),
84 RespawnPacket::READY_TO_SPAWN,
85 $this->player->getId()