menu
#2471349 Undefined index: amount

Submitted by PocketMine-MP 3.8.1

General information

Version: 3.8.1
Git commit: 7521160f
Plugin involvement: Direct
Report date: 2019-06-12 15:11:37 +0000 UTC

System Information

PHP version: 7.2.13
Operating system: linux
System banner: Linux 1021.DE.Cloud.Cube-Hosting.cloud 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64

Error information

Warning: the MysteryCrate plugin was directly involved in this crash. Please contact the plugin author.
Message: Undefined index: amount
File: plugins/MysteryCrate_v9.1.0/src/JackMD/MysteryCrate/UpdaterEvent
Line: #153
Error level: ErrorException
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
		$reward = array_rand($drops, 1);
$reward = $drops[$reward];

if(!isset($reward["id"]) || !isset($reward["meta"]) || !isset($reward["amount"])){
$this->player->kick("§cMysteryCrate caught fire!\nPlease report to Admin to look for error on console.", false);
$this->plugin->getLogger()->error("Either `id` or `meta` or `amount` key is missing in " . ucfirst($type) . " Crate.");
$this->plugin->getServer()->getPluginManager()->disablePlugin($this->plugin);
}

$item = Item::get($reward["id"], $reward["meta"], $reward["amount"]);

if(isset($reward["name"])){
$item->setCustomName($reward["name"]);
}
if(isset($reward["lore"])){
$item->setLore([$reward["lore"]]);
}
if(isset($reward["commands"])){
foreach($reward["commands"] as $index => $cmd){
$nbt = $item->getNamedTag() ?? new CompoundTag("", []);
#0 plugins/MysteryCrate_v9.1.0/src/JackMD/MysteryCrate/UpdaterEvent(153): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string Undefined index: amount, string /root/Test/plugins/MysteryCrate_v9.1.0/src/JackMD/MysteryCrate/UpdaterEvent.php, integer 153, array Array())
#1 plugins/MysteryCrate_v9.1.0/src/JackMD/MysteryCrate/UpdaterEvent(216): JackMD\MysteryCrate\UpdaterEvent->getReward()
#2 src/pocketmine/scheduler/TaskHandler(159): JackMD\MysteryCrate\UpdaterEvent->onRun(integer 2683)
#3 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 2683)
#4 src/pocketmine/plugin/PluginManager(688): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 2683)
#5 src/pocketmine/Server(2559): pocketmine\plugin\PluginManager->tickSchedulers(integer 2683)
#6 src/pocketmine/Server(2335): pocketmine\Server->tick()
#7 src/pocketmine/Server(2196): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1775): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(258): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /root/Test/, string /root/Test/plugins/)
#10 (1): require(string phar:///root/Test/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show