Closed thinh2118 closed 3 years ago
Error: Call to a member function getCurrentMenu() on null File: plugins/AuctionHouse_v1.2.1.phar/src/shock95x/auctionhouse/menu/AHMenu Line: 39 Type: Error
THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: AuctionHouse v1.2.1
Code: [30] protected $inventory; [31] [32] public function construct(Player $player, bool $returnMain = false, bool $pagination = false) { [33] $type = InvMenuHandler::getMenuType($this->inventoryType); [34] parent::construct($type); [35] $this->returnMain = $returnMain; [36] $this->pagination = $pagination; [37] [38] // workaround for recursive menus [39] if(PlayerManager::get($player)->getCurrentMenu() != null && !$this->newMenu) { [40] $menu = PlayerManager::get($player)->getCurrentMenu(); [41] // workaround for inventory bug [42] if($menu->getInventory()->getSize() < $type->getSize()) { [43] $player->removeWindow($menu->getInventory()); [44] $this->createNewInventory($type); [45] } else { [46] $menu->getInventory()->clearAll(); [47] $this->inventory = $menu->getInventory(); [48] $menu->setListener([$this, "handle"]); [49] }
Backtrace:
Should be fixed in 1.2.2
bjr I have the same problem with version 1.16.50 please recorrected your bug really because the other bugs too
@willtom6666 What version of the plugin are you using
Error: Call to a member function getCurrentMenu() on null File: plugins/AuctionHouse_v1.2.1.phar/src/shock95x/auctionhouse/menu/AHMenu Line: 39 Type: Error
THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: AuctionHouse v1.2.1
Code: [30] protected $inventory; [31]
[32] public function construct(Player $player, bool $returnMain = false, bool $pagination = false) { [33] $type = InvMenuHandler::getMenuType($this->inventoryType); [34] parent::construct($type); [35] $this->returnMain = $returnMain; [36] $this->pagination = $pagination; [37] [38] // workaround for recursive menus [39] if(PlayerManager::get($player)->getCurrentMenu() != null && !$this->newMenu) { [40] $menu = PlayerManager::get($player)->getCurrentMenu(); [41] // workaround for inventory bug [42] if($menu->getInventory()->getSize() < $type->getSize()) { [43] $player->removeWindow($menu->getInventory()); [44] $this->createNewInventory($type); [45] } else { [46] $menu->getInventory()->clearAll(); [47] $this->inventory = $menu->getInventory(); [48] $menu->setListener([$this, "handle"]); [49] }
Backtrace:
0 plugins/AuctionHouse_v1.2.1.phar/src/shock95x/auctionhouse/menu/ConfirmPurchaseMenu(30): shock95x\auctionhouse\menu\AHMenu->__construct(object pocketmine\Player)
1 plugins/AuctionHouse_v1.2.1.phar/src/shock95x/auctionhouse/menu/MainMenu(118): shock95x\auctionhouse\menu\ConfirmPurchaseMenu->__construct(object pocketmine\Player, object pocketmine\item\Pickaxe)
2 src/pocketmine/scheduler/TaskHandler(137): class@anonymous phar://C:/Users/Administrator/Desktop/SkyBlock MCPE 1.16/plugins/AuctionHouse_v1.2.1.phar/src/shock95x/auctionhouse/menu/MainMenu.php000000055FE3871E->onRun(integer 517684)
3 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 517684)
4 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 517684)
5 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 517684)
6 src/pocketmine/Server(2154): pocketmine\Server->tick()
7 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
8 src/pocketmine/Server(1588): pocketmine\Server->start()
9 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[50] C:\Users\Administrator\Desktop\SkyBlock MCPE 1.16\, string[58] C:\Users\Administrator\Desktop\SkyBlock MCPE 1.16\plugins)
10 src/pocketmine/PocketMine(304): pocketmine\server()