I am making plugin named sbmenu on gui and I am using invmenu. Btw I need to add functions like command open another menu bye changing a slot item if u r able to help me PLSS give an example so I can learn fast. Thanks in advance Code is PHP: public function sbmenu($sender) { $this->menu->readonly(); $this->menu->setName("§rSkyBlock Menu"); $inventory = $this->menu->getInventory(); $inventory->setContents(array_fill(0, 54, ItemFactory::get(ItemIds::IRON_BARS)->setCustomName(TextFormat::ITALIC))); $inventory->setItem(13, ItemFactory::get(ItemIds::SKULL, 3)->setCustomName("§r§eYour profile \n§a⚔Damage §d\n§a❤Health §d" . $sender->getHealth() . "\n♆§aStrenght 10 \n✦§aSpeed 100 \n§a❇Crit Chance §d0\n§a✴Crit Damage §d0.5\n§a✔Pet Luck §d10\n§a✎Intelligence §d1000IQ\n♱§aMagic Find §d19\n❉§aSea Creature chance 24%")); $inventory->setItem(19, ItemFactory::get(ItemIds::DIAMOND_SWORD)->setCustomName("§r§aSkills\n§eYou can check your skills in specific Category!")); $inventory->setItem(20, ItemFactory::get(ItemIds::PAINTING)->setCustomName("§r§cCollections\n§aYou ccan check your collections in specific categories!")); $inventory->setItem(21, ItemFactory::get(ItemIds::BOOK)->setCustomName("§r§aRecipe book")->setLore("§r§eClick to see unlocked recipes!")); $inventory->setItem(22, ItemFactory::get(ItemIds::EMERALD)->setCustomName("§r§aTrade§c§4COMING SOON§c)§r")); $inventory->setItem(23, ItemFactory::get(ItemIds::BOOK)->setCustomItem("§r§gMail log")); $inventory->setItem(24, ItemFactory::get(ItemIds::BOOK)->setCustomItem("§r§bQuest Log!\n Tap to open quest logs!"));$inventory->setItem(25, ItemFactory::get(ItemIds::CLOCK)->setCustomItem("§r§aEVENTS!"));$inventory->setItem(26, ItemFactory::get(ItemIds::ENDER_CHEST)->setCustomItem("§r§gEnder Chest!\n Tap to open ender storage!"));$inventory->setItem(31, ItemFactory::get(ItemIds::CRAFTING_TABLE)->setCustomItem("§r§gCRAFTING TABLE!\n Tap to open custom crafting gui!")); $this->menu->send($sender); } $player = $sender->getName();$player, Item $itemClicked, Item $itemClickedWith, SlotChangeAction $action): bool { switch ($action->getSlot()) { case 31: $this->getServer()->dispatchCommand($sender, "invcraft"); } }
1. Create "custom items" 2. Give them custom items 3. Listen on event (PlayerInteractEvent, PlayerItemHeldEvent) 4. Open the InvMenu Something helpful: https://forums.pmmp.io/threads/hotbar-menu.4004/