menu
#3237087 Invalid argument supplied for foreach()

Submitted by PocketMine-MP 3.9.5

General information

Version: 3.9.5
Git commit: f0539f48
Plugin involvement: Direct
Report date: 2019-12-01 07:51:49 +0000 UTC

System Information

PHP version: 7.3.8
Operating system: linux
System banner: Linux www 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64

Error information

Warning: the MeRpgPlus plugin was directly involved in this crash. Please contact the plugin author.
Message: Invalid argument supplied for foreach()
File: plugins/MeRpgPlus_v1.12.7.phar/src/MeKO/MeRpgPlus
Line: #575
Error level: ErrorException
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
                    $this->lastWeapon[$player->getName()] = $weaponName;
}
$weaponConfig = $this->getWeaponConfig($weaponName);
if(!isset($this->effect[$player->getName()])){
$this->effect[$player->getName()] = [];
}
if(!isset($this->timer[$player->getName()])){
$this->timer[$player->getName()] = [];
}
foreach ($weaponConfig->get("手持效果") as $list => $effect) {
$effects = explode(":", $effect);
$ef = Effect::getEffect((int)$effects[0]);
if (!$player->hasEffect($ef->getId())) {
if (!isset($effects[2]) && !isset($effects[3])) {
$player->addEffect(new EffectInstance($ef, 100, (int)$effects[1]));
$this->effect[$player->getName()][] = $effects[0];
} else if (isset($effects[2]) && !isset($effects[3])) {
$player->addEffect(new EffectInstance($ef, (int)$effects[2] * 20, (int)$effects[1]));

$this->effect[$player->getName()][] = $effects[0];
#0 plugins/MeRpgPlus_v1.12.7.phar/src/MeKO/MeRpgPlus(575): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[39] Invalid argument supplied for foreach(), string[73] phar:///home/xia/pm/plugins/MeRpgPlus_v1.12.7.phar/src/MeKO/MeRpgPlus.php, integer 575, array[4])
#1 (): MeKO\MeRpgPlus->cooling(object MeKO\RunTime)
#2 plugins/MeRpgPlus_v1.12.7.phar/src/MeKO/RunTime(29): call_user_func_array(array[2], array[1])
#3 src/pocketmine/scheduler/TaskHandler(159): MeKO\RunTime->onRun(integer 1513481)
#4 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 1513481)
#5 src/pocketmine/plugin/PluginManager(681): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1513481)
#6 src/pocketmine/Server(2570): pocketmine\plugin\PluginManager->tickSchedulers(integer 1513481)
#7 src/pocketmine/Server(2346): pocketmine\Server->tick()
#8 src/pocketmine/Server(2206): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1784): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[13] /home/xia/pm/, string[21] /home/xia/pm/plugins/)
#11 src/pocketmine/PocketMine(299): pocketmine\server()
#12 (1): require(string[68] phar:///home/xia/pm/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show