menu
#10624140 Call to undefined method pocketmine\item\Item::get()

Submitted by PocketMine-MP 5.13.0

General information

Version: 5.13.0
Git commit: f193a990
Plugin involvement: Direct
Report date: 2024-04-03 04:59:58 +0000 UTC
Server uptime: 0 days 0 hours 5 minutes 22 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: Call to undefined method pocketmine\item\Item::get()
File: plugins/KITS/src/crakatua/Main
Line: #88
Type: Error
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
    }
return true;
}

private function openGKitMenu(Player $player): void {
$menu = InvMenu::create(InvMenu::TYPE_DOUBLE_CHEST);
$menu->setName("GKits Menu");

// Crear una espada de madera con el nombre "FREE"
$freeSword = Item::get(Item::WOODEN_SWORD);
$freeSword->setCustomName("FREE");

// Crear una espada de diamante con el nombre "PAID"
$paidSword = Item::get(Item::DIAMOND_SWORD);
$paidSword->setCustomName("PAID");

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

#0 plugins/KITS/src/crakatua/Main(39): crakatua\Main->openGKitMenu(object pocketmine\player\Player#149637)
#1 pmsrc/src/command/PluginCommand(46): crakatua\Main->onCommand(object pocketmine\player\Player#149637, object pocketmine\command\PluginCommand#45337, string[4] gkit, array[0])
#2 pmsrc/src/command/SimpleCommandMap(212): pocketmine\command\PluginCommand->execute(object pocketmine\player\Player#149637, string[4] gkit, array[0])
#3 pmsrc/src/Server(1431): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#149637, string[4] gkit)
#4 pmsrc/src/player/Player(1516): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#149637, string[4] gkit)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(819): pocketmine\player\Player->chat(string[5] /gkit)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#81128)
#7 pmsrc/src/network/mcpe/NetworkSession(456): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#81426)
#8 pmsrc/src/network/mcpe/NetworkSession(394): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#81128, string[27] M./gkit.cC,'....rg.4..7...L)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(214): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[75] ...e.O..,aHv.Q...q[Q:..+..R........~.-.Xwh....".N. .I..P..g`dbx....MX......)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[84] ....D..........n....\-< .......L..o:.....u.KL....x....f...`.z!.#.2._{.GNWW'.pAL.)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(107): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#180044)
#12 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine\{closure}()
#14 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()
#15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#16 pmsrc/src/Server(1696): pocketmine\snooze\SleeperHandler->sleepUntil(float 1712120398.7125)
#17 pmsrc/src/Server(1066): pocketmine\Server->tickProcessor()
#18 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/)
#19 pmsrc/src/PocketMine(373): pocketmine\server()
#20 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