menu
#3766534 Illegal string offset 'level'

Submitted by PocketMine-MP 3.11.1

General information

Version: 3.11.1
Git commit: 40a2211a
Plugin involvement: Direct
Report date: 2020-02-14 04:17:00 +0000 UTC

System Information

PHP version: 7.3.13
Operating system: win
System banner: Windows NT NguyenHoaiAn 6.3 build 9600 (Windows Server 2012 R2 Datacenter Edition) AMD64

Error information

Warning: the MysteryCrate plugin was directly involved in this crash. Please contact the plugin author.
Message: Illegal string offset 'level'
File: plugins/MysteryCrate (1).phar/src/JackMD/MysteryCrate/UpdaterEvent
Line: #171
Error level: ErrorException
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
			foreach($reward["commands"] as $index => $cmd){
$nbt = $item->getNamedTag() ?? new CompoundTag("", []);
$cmd = str_replace(["%PLAYER%"], [$player->getName()], $cmd);
$nbt->setString((string) $index, $cmd);
$item->setNamedTag($nbt);
}
}
if(isset($reward["enchantments"])){
foreach($reward["enchantments"] as $enchantName => $enchantData){
$level = $enchantData["level"];
$ce = $this->plugin->getServer()->getPluginManager()->getPlugin("PiggyCustomEnchants");
if(!is_null($ce) && !is_null($enchant = CustomEnchants::getEnchantmentByName($enchantName))){
if($ce instanceof CE){
$item = $ce->addEnchantment($item, $enchantName, $level);
}
}else{
if(!is_null($enchant = Enchantment::getEnchantmentByName($enchantName))){
$item->addEnchantment(new EnchantmentInstance($enchant, $level));
}
}
#0 plugins/MysteryCrate (1).phar/src/JackMD/MysteryCrate/UpdaterEvent(171): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[29] Illegal string offset 'level', string[104] phar://C:/Users/vps/Desktop/MCPE3/plugins/MysteryCrate (1).phar/src/JackMD/Myste, integer 171, array[12])
#1 plugins/MysteryCrate (1).phar/src/JackMD/MysteryCrate/UpdaterEvent(216): JackMD\MysteryCrate\UpdaterEvent->getReward()
#2 src/pocketmine/scheduler/TaskHandler(159): JackMD\MysteryCrate\UpdaterEvent->onRun(integer 10716)
#3 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 10716)
#4 src/pocketmine/plugin/PluginManager(682): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 10716)
#5 src/pocketmine/Server(2567): pocketmine\plugin\PluginManager->tickSchedulers(integer 10716)
#6 src/pocketmine/Server(2343): pocketmine\Server->tick()
#7 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1785): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[27] C:\Users\vps\Desktop\MCPE3\, string[35] C:\Users\vps\Desktop\MCPE3\plugins\)
#10 src/pocketmine/PocketMine(295): pocketmine\server()
#11 (1): require(string[82] phar://C:/Users/vps/Desktop/MCPE3/PocketMine-MP.phar/src/pocketmine/PocketMine.p)

Loaded Plugins

  • Show

Server Settings

  • Show