menu
#4583590 Argument 3 passed to JackMD\MysteryCrate\UpdaterEvent::rewardPlayer() must be of the type string, bool given

Submitted by PocketMine-MP 3.15.2

General information

Version: 3.15.2
Git commit: d7a66ad7
Plugin involvement: Direct
Report date: 2020-10-18 04:26:16 +0000 UTC

System Information

PHP version: 7.3.23
Operating system: linux
System banner: Linux 2706baa6-6616-45cf-80de-876d1d98b00c 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64

Error information

Warning: the MysteryCrate plugin was directly involved in this crash. Please contact the plugin author.
Message: Argument 3 passed to JackMD\MysteryCrate\UpdaterEvent::rewardPlayer() must be of the type string, bool given
File: plugins/MysteryCrate.phar/src/JackMD/MysteryCrate/UpdaterEvent
Line: #112
Error level: TypeError
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
			$this->getHandler()->cancel();
}
}

/**
* @param Player $player
* @param Item $item
* @param string $type
*/
public function rewardPlayer(Player $player, Item $item, string $type){
if($item->getDamage() === $this->plugin->getConfig()->get("commandMeta")){
$nbt = $item->getNamedTag();
for($i = 0; $i < $this->plugin->getConfig()->get("maxCommands"); $i++){
if($nbt->hasTag((string) $i, StringTag::class)){
$cmd = $nbt->getString((string) $i);
$this->plugin->getServer()->dispatchCommand(new ConsoleCommandSender(), $cmd);
}
}
}else{
$player->getInventory()->addItem($item);
#0 plugins/MysteryCrate.phar/src/JackMD/MysteryCrate/UpdaterEvent(233): JackMD\MysteryCrate\UpdaterEvent->rewardPlayer(object pocketmine\Player, object pocketmine\item\GoldenApple, boolean )
#1 src/pocketmine/scheduler/TaskHandler(137): JackMD\MysteryCrate\UpdaterEvent->onRun(integer 3705)
#2 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 3705)
#3 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 3705)
#4 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 3705)
#5 src/pocketmine/Server(2154): pocketmine\Server->tick()
#6 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1588): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#9 src/pocketmine/PocketMine(304): pocketmine\server()
#10 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies