Why the chest window do not popup when i call that with a command ? public function commandHandler($cmd, $params, $issuer, $alias){ switch($cmd){ case "openchest": $player = $issuer; $this->openEnderchest = true; //console(FORMAT_GREEN."Chest Open".FORMAT_RESET); $player->windowCnt++; $player->windowCnt = $id = max(2, $player->windowCnt % 99); $player->windows[$id] = TILE_CHEST; $pk = new ContainerOpenPacket; $pk->windowid = $id; $pk->type = WINDOW_CHEST; $pk->slots = is_array($player->windows[$id]) ? CHEST_SLOTS << 1:CHEST_SLOTS; $pk->x = 0; $pk->y = 0; $pk->z = 0; $player->dataPacket($pk); break; } }
bah if you code a simple handle like that, you can disable the opening of the window chest PHP: public function eventHandle($data, $event) { switch ($event) { case "player.block.touch": if($data["target"]->getID() == 54) return false; break; } } why i cant open a window chest without chest ?
Because when a player taps a Chest they ask the server for the chest items, if they get the chest packet at any other time they don't use it, if they don't receive packet then they can't open the chest.
Ok this time I understand what you mean !! Well, i can send the pakect anytime but the client ll not process it because it didnt ask for it !! So im sad that i cant do that ;(