ClickedTran / RankShopGUI

RankShop for PocketMine-MP 5.0.0
GNU General Public License v3.0
4 stars 1 forks source link

if i use the Rangshop command if create a Category he kicked me out for this Error #1

Closed DragonfireHD98 closed 9 months ago

DragonfireHD98 commented 9 months ago

PocketMine-MP version: 5.11.0 [Protocol 649] Git commit: ce8fecc6ecd62433d28090f4bae1b5cb3e6b9710 PHP version: 8.2.13 OS: Linux, linux

THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: RankShopGUI

Thread: Main Error: Call to a member function setCustomName() on null File: plugins/rangshop4.phar/src/ClickedTran/rankshop/gui/GUIManager Line: 38 Type: Error Backtrace:

0 plugins/rangshop4.phar/src/ClickedTran/rankshop/command/RankShopGUICommand(43): ClickedTran\rankshop\gui\GUIManager->menuShop(object refaltor\coppervanillamods\player\CustomPlayer#149528)

1 pmsrc/src/command/SimpleCommandMap(212): ClickedTran\rankshop\command\RankShopGUICommand->execute(object refaltor\coppervanillamods\player\CustomPlayer#149528, string[5] rangs, array[0])

2 pmsrc/src/Server(1434): pocketmine\command\SimpleCommandMap->dispatch(object refaltor\coppervanillamods\player\CustomPlayer#149528, string[5] rangs)

3 pmsrc/src/player/Player(1512): pocketmine\Server->dispatchCommand(object refaltor\coppervanillamods\player\CustomPlayer#149528, string[5] rangs)

4 pmsrc/src/network/mcpe/handler/InGamePacketHandler(821): pocketmine\player\Player->chat(string[6] /rangs)

5 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#143992)

6 pmsrc/src/network/mcpe/NetworkSession(462): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#78845)

7 pmsrc/src/network/mcpe/NetworkSession(400): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#143992, string[28] M./rangs.GEX~......a...W...J)

8 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[74] ...e./J.K/fpw.....$syg.....W30x.L`d..w..{7.:\d..t.j.a.(..3021,e...&,.....)

9 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[83] .O}.".?.0..q...0.cg{V.D..TJE.6F.)..rz...w......7.+..=..-...^..$C%....h:Nu....^..)

10 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#150291)

11 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib{closure}()

12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine{closure}()

13 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()

14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()

15 pmsrc/src/Server(1699): pocketmine\snooze\SleeperHandler->sleepUntil(float 1707833005.6539)

16 pmsrc/src/Server(1067): pocketmine\Server->tickProcessor()

17 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)

18 pmsrc/src/PocketMine(364): pocketmine\server()

19 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

ClickedTran commented 9 months ago

PocketMine-MP version: 5.11.0 [Protocol 649] Git commit: ce8fecc6ecd62433d28090f4bae1b5cb3e6b9710 PHP version: 8.2.13 OS: Linux, linux

THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: RankShopGUI

Thread: Main Error: Call to a member function setCustomName() on null File: plugins/rangshop4.phar/src/ClickedTran/rankshop/gui/GUIManager Line: 38 Type: Error Backtrace: #0 plugins/rangshop4.phar/src/ClickedTran/rankshop/command/RankShopGUICommand(43): ClickedTran\rankshop\gui\GUIManager->menuShop(object refaltor\coppervanillamods\player\CustomPlayer#149528) #1 pmsrc/src/command/SimpleCommandMap(212): ClickedTran\rankshop\command\RankShopGUICommand->execute(object refaltor\coppervanillamods\player\CustomPlayer#149528, string[5] rangs, array[0]) #2 pmsrc/src/Server(1434): pocketmine\command\SimpleCommandMap->dispatch(object refaltor\coppervanillamods\player\CustomPlayer#149528, string[5] rangs) #3 pmsrc/src/player/Player(1512): pocketmine\Server->dispatchCommand(object refaltor\coppervanillamods\player\CustomPlayer#149528, string[5] rangs) #4 pmsrc/src/network/mcpe/handler/InGamePacketHandler(821): pocketmine\player\Player->chat(string[6] /rangs) #5 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#143992) #6 pmsrc/src/network/mcpe/NetworkSession(462): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#78845) #7 pmsrc/src/network/mcpe/NetworkSession(400): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#143992, string[28] M./rangs.GEX~......a...W...J) #8 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[74] ...e./J.K/fpw.....$syg.....W30x.L`d..w..{7.:\d..t.j.a.(..3021,e...&,.....) #9 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[83] .O}.".?.0..q...0.cg{V.D..TJE.6F.)..rz...w......7.+..=..-...^..$C%....h:Nu....^..) #10 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#150291) #11 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib{closure}() #12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine{closure}() #13 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications() #14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications() #15 pmsrc/src/Server(1699): pocketmine\snooze\SleeperHandler->sleepUntil(float 1707833005.6539) #16 pmsrc/src/Server(1067): pocketmine\Server->tickProcessor() #17 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/) #18 pmsrc/src/PocketMine(364): pocketmine\server() #19 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Dear @DragonfireHD98 , Sorry for the unexpected error that occurred from the RankShopGUI plugin that interrupted your plugin/server experience, can you record a video and upload it here so I can see why the error occurred? Thank you for reporting the error ClickedTran

DragonfireHD98 commented 9 months ago

example i use for the ranks pureperms and if i joined the server and create a category is all right but if i use /ranks for buying a rank he crashed me out in this time and the Error comes for the line 38

DragonfireHD98 commented 9 months ago
 $shop = RankShopGUI::getInstance()->getShop()->getAll();
    if(count($shop) >= 1){
      foreach($shop as $category => $slot){
          $inv->setItem((int)$shop[$category]["slot"], StringToItemParser::getInstance()->parse($shop[$category]["item"])->setCustomName((string)$category."\n\n§aRank required: ".$shop[$category]["rank_required"]." \n§9Next rank: ".$shop[$category]["next_rank"]." \n§aPrice: $".$shop[$category]["price"]." \n\n§bYour Rank: §6".$plugin->rankProvider->getRank($player)." \n\n§b=====§9Description§b=====\n".str_replace(["{line}"], ["\n§r"], $shop[$category]["description"]))->setCount(1));
      }
    }
DragonfireHD98 commented 9 months ago

on setcustomname is the error

ClickedTran commented 9 months ago

on setcustomname is the error

Dear @DragonfireHD98 , Can you take a screenshot for me of the plugin_data/RankShopGUI/shop.yml section?

DragonfireHD98 commented 9 months ago

Screenshot 2024-02-13 174914

DragonfireHD98 commented 9 months ago

i think dosent set item is that right :D

DragonfireHD98 commented 9 months ago

question how can i did to get the rank ?? from pureperms

ClickedTran commented 9 months ago

Screenshot 2024-02-13 174914

Dear @DragonfireHD98, Please enter a specific item type in the "item" field, for example diamond, and try again Thanks

DragonfireHD98 commented 9 months ago

never maind :D sorry very nice plugin no errors XD