My code : <?php namespace Test; use muqsit\invmenu\{InvMenu, InvMenuHandler}; use pocketmine\command\{Command, CommandSender}; use pocketmine\item\Item; use pocketmine\nbt\BigEndianNBTStream; use pocketmine\nbt\tag\{CompoundTag, ListTag}; use pocketmine\Player; use pocketmine\plugin\PluginBase; use pocketmine\utils\{Config, TextFormat as TF}; class Main extends PluginBase{ public function onEnable() : void{ if(!InvMenuHandler::isRegistered()){ InvMenuHandler::register($this); } $menu = InvMenu::create(InvMenu::TYPE_CHEST) ->readonly() ->setName("The Inventory's Name") ->setListener([$this, "handleMenuSelection"]); $inv = $menu->getInventory(); $item = Item::get(Item::STONE); $item->setCustomName("Click ME!"); $inv->setItem(0, $item); } public function handleMenuSelection(Player $player, Item $itemClicked) : bool{ if($itemClicked->getId() === Item::STONE){ $player->getServer()->dispatchCommand($player, "say Hi"); } return true; } public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args) : bool { switch($cmd->getName()){ case "menu": $menu->send($player); break; } } } My problem : [16:49:02] [Server thread/CRITICAL]: Error: "Class 'muqsit\invmenu\InvMenuHandler' not found" (EXCEPTION) in "plugins/Test_v1/src/Test/Main" at line 17 [16:49:02] [Server thread/DEBUG]: #0 src/pocketmine/plugin/PluginBase(123): Test\Main->onEnable() [16:49:02] [Server thread/DEBUG]: #1 src/pocketmine/plugin/PluginManager(587): pocketmine\plugin\PluginBase->setEnabled(boolean 1) [16:49:02] [Server thread/DEBUG]: #2 src/pocketmine/Server(2003): pocketmine\plugin\PluginManager->enablePlugin(Test\Main object) [16:49:02] [Server thread/DEBUG]: #3 src/pocketmine/Server(1989): pocketmine\Server->enablePlugin(Test\Main object) [16:49:02] [Server thread/DEBUG]: #4 src/pocketmine/Server(1783): pocketmine\Server->enablePlugins(integer 1) [16:49:02] [Server thread/DEBUG]: #5 src/pocketmine/PocketMine(249): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string C:\Users\leora\Desktop\D..veloppement\PocketMine-MP\, string C:\Users\leora\Desktop\D..veloppement\PocketMine-MP\plugins\) [16:49:02] [Server thread/DEBUG]: #6 (1): require(string phar://C:/Users/leora/Desktop/D..veloppement/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
Download https://poggit.pmmp.io/r/34000/DEVirion.phar put it in plugins/ Put this https://poggit.pmmp.io/r/50229/InvMenu_dev-45.phar on virions/ I think that how it works(I don’t use that virions)
By the way, if you want to use InvMenu in your plugin that's in .phar format, you can run the following: Code: bin/php7/bin/php virions/InvMenu.phar /path/to/your/plugin.phar That will inject the InvMenu virion into your phar plugin.