Hello PMMP Devs. I'm a new starter dev and I'm trying to figure out to open a double chest on command and save the items inside of the chest if i run the command again. I need your help. Please help me
You can check this plugin https://github.com/Muqsit/PlayerVaults to to get idea and create your your own.
Double chests are complicated. You'll need to add at max a 0.25s delay AFTER sending the player the blocks and tiles. This delay can be shortened depending on the player's ping (Player::getPing()). After this delay you can send the player the inventory. Code: Send blocks to player Send tiles with pairx and pairz NBT tags scheduleDelayedTask(0.25s){ player->sendInventory(); }
Okay, I have just finished working on double chests. You can check out how it's done here: https://github.com/Muqsit/InvMenu More importantly, here: https://github.com/Muqsit/InvMenu/b...inventories/DoubleChestInventory.php#L24-#L52 Or you can make use of the API directly. It's pretty simple and straightforward. PHP: $menu = new InvMenu(InvMenu::TYPE_DOUBLE_CHEST);$menu->getInventory()->setContents([ Item::get(Item::GOLD_INGOT)]);/** @var Player $player */$menu->send($player);