Code PHP: $chest = Tile::createTile("Chest", $sender->getLevel(), new CompoundTag("", [ new StringTag("id", "Tile::Chest"), new IntTag("x", floor($sender->x)), new IntTag("y", floor($sender->y)), new IntTag("z", floor($sender->x))])); $block = Block::get(Block::CHEST); $block->x = $chest->x; $block->y = $chest->y; $block->z = $chest->z; $block->level = $chest->getLevel(); $block->level->sendBlocks([$sender], [$block]); foreach($player->getInventory()->getContents() as $item) { $chest->getInventory()->addItem($item); $sender->addWindow($chest->getInventory()); Basically when I execute command I see the inventory for a split second then it randomly disappears