menu
#10623893 crakatua\Main::openGKitMenu(): Argument #1 ($player) must be of type pocketmine\player\Player, pocketmine\console\ConsoleCommandSender given, called in /home/container/plugins/KITS/src/crakatua/Main.php on line 39

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:51:16 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 5 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: crakatua\Main::openGKitMenu(): Argument #1 ($player) must be of type pocketmine\player\Player, pocketmine\console\ConsoleCommandSender given, called in /home/container/plugins/KITS/src/crakatua/Main.php on line 39
File: plugins/KITS/src/crakatua/Main
Line: #83
Type: TypeError
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
            }
break;
default:
$sender->sendMessage("Comando desconocido.");
break;
}
return true;
}

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

$freeSword = VanillaItems::WOODEN_SWORD()->setCustomName("FREE");
$paidSword = VanillaItems::DIAMOND_SWORD()->setCustomName("PAID");

$menu->getInventory()->setItem(20, $freeSword);
$menu->getInventory()->setItem(24, $paidSword);

$menu->setListener(function (InvMenuTransaction $transaction): InvMenuTransactionResult {
#0 plugins/KITS/src/crakatua/Main(39): crakatua\Main->openGKitMenu(object pocketmine\console\ConsoleCommandSender#168291)
#1 pmsrc/src/command/PluginCommand(46): crakatua\Main->onCommand(object pocketmine\console\ConsoleCommandSender#168291, object pocketmine\command\PluginCommand#45297, string[4] gkit, array[0])
#2 pmsrc/src/command/SimpleCommandMap(212): pocketmine\command\PluginCommand->execute(object pocketmine\console\ConsoleCommandSender#168291, string[4] gkit, array[0])
#3 pmsrc/src/Server(1431): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\console\ConsoleCommandSender#168291, string[4] gkit)
#4 pmsrc/src/Server(1853): pocketmine\Server->dispatchCommand(object pocketmine\console\ConsoleCommandSender#168291, string[4] gkit)
#5 pmsrc/src/Server(1693): pocketmine\Server->tick()
#6 pmsrc/src/Server(1066): pocketmine\Server->tickProcessor()
#7 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/)
#8 pmsrc/src/PocketMine(373): pocketmine\server()
#9 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