menu
#10624292 Undefined variable $freeSword

Submitted by PocketMine-MP 5.13.0

General information

Version: 5.13.0
Git commit: f193a990
Plugin involvement: Direct
Report date: 2024-04-03 05:05:09 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 56 seconds

System Information

PHP version: 8.2.13
JIT status: Not available
Operating system: linux
System banner: Linux 8263815a-0d00-465b-9130-163315a10349 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64

Error information

Warning: the GKits plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Undefined variable $freeSword
File: plugins/KITS/src/crakatua/Main
Line: #101
Type: ErrorException
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

// Colocar los items en los slots correspondientes
$menu->getInventory()->setItem(20, $freeSword); // Los slots empiezan en 0
$menu->getInventory()->setItem(24, $paidSword);

$menu->setListener(function (InvMenuTransaction $transaction): InvMenuTransactionResult {
$itemClicked = $transaction->getItemClicked();
$player = $transaction->getPlayer();

if($itemClicked->equals($freeSword, false)) {
$this->openFreeKitsMenu($player);
} elseif($itemClicked->equals($paidSword, false)) {
$this->openPaidKitsMenu($player);
}

return $transaction->discard();
});

$menu->send($player);
}
#0 plugins/KITS/src/crakatua/Main(101): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[29] Undefined variable $freeSword, string[50] /home/container/plugins/KITS/src/crakatua/Main.php, int 101)
#1 plugins/KITS/src/muqsit/invmenu/InvMenu(190): crakatua\Main->crakatua\{closure}(object muqsit\invmenu\transaction\SimpleInvMenuTransaction#78510)
#2 plugins/KITS/src/muqsit/invmenu/InvMenuEventHandler(75): muqsit\invmenu\InvMenu->handleInventoryTransaction(object pocketmine\player\Player#149637, object pocketmine\item\Sword#78462, object pocketmine\item\ItemBlock#78484, object pocketmine\inventory\transaction\action\SlotChangeAction#78472, object pocketmine\inventory\transaction\InventoryTransaction#78441)
#3 pmsrc/src/event/RegisteredListener(61): muqsit\invmenu\InvMenuEventHandler->onInventoryTransaction(object pocketmine\event\inventory\InventoryTransactionEvent#78494)
#4 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\inventory\InventoryTransactionEvent#78494)
#5 pmsrc/src/inventory/transaction/InventoryTransaction(295): pocketmine\event\Event->call()
#6 pmsrc/src/inventory/transaction/InventoryTransaction(313): pocketmine\inventory\transaction\InventoryTransaction->callExecuteEvent()
#7 pmsrc/src/network/mcpe/handler/InGamePacketHandler(373): pocketmine\inventory\transaction\InventoryTransaction->execute()
#8 pmsrc/src/network/mcpe/handler/InGamePacketHandler(599): pocketmine\network\mcpe\handler\InGamePacketHandler->executeInventoryTransaction(object pocketmine\inventory\transaction\InventoryTransaction#78441, int -593)
#9 pmsrc/src/network/mcpe/handler/InGamePacketHandler(620): pocketmine\network\mcpe\handler\InGamePacketHandler->handleSingleItemStackRequest(object pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequest#78414)
#10 pmsrc/vendor/pocketmine/bedrock-protocol/src/ItemStackRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleItemStackRequest(object pocketmine\network\mcpe\protocol\ItemStackRequestPacket#185624)
#11 pmsrc/src/network/mcpe/NetworkSession(456): pocketmine\network\mcpe\protocol\ItemStackRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#81419)
#12 pmsrc/src/network/mcpe/NetworkSession(394): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\ItemStackRequestPacket#185624, string[19] ..........(;.......)
#13 pmsrc/src/network/mcpe/raklib/RakLibInterface(214): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[65] ...........]D.....?..L`....)[email protected]`dbx....MX......)
#14 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[74] ....v.b....T...4..Y...j..vV.).);).~.%...1..#......U....K.PN.z.*..........\)
#15 pmsrc/src/network/mcpe/raklib/RakLibInterface(107): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#180044)
#16 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#17 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine\{closure}()
#18 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()
#19 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#20 pmsrc/src/Server(1696): pocketmine\snooze\SleeperHandler->sleepUntil(float 1712120709.9614)
#21 pmsrc/src/Server(1066): pocketmine\Server->tickProcessor()
#22 pmsrc/src/PocketMine(350): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#23 pmsrc/src/PocketMine(373): pocketmine\server()
#24 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show