menu
#3980897 Call to a member function count() on null

Submitted by PocketMine-MP 3.9.8

General information

Version: 3.9.8
Git commit: 6399dacb
Plugin involvement: Direct
Report date: 2020-03-25 21:37:28 +0000 UTC

System Information

PHP version: 7.3.14
Operating system: linux
System banner: Linux pikmine 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64

Error information

Warning: the MultiWorld plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function count() on null
File: plugins/MultiWorld.phar/src/czechpmdevs/multiworld/api/WorldGameRulesAPI
Line: #60
Error level: Error
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

if(!$compound instanceof CompoundTag) {
$levelProvider->getLevelData()->setTag(new CompoundTag("GameRules", []));
$rules = $levelProvider->getLevelData()->getCompoundTag("GameRules");
foreach (self::getDefaultGameRules() as $rule => [$type, $value]) {
$rules->setString($rule, self::getStringFromValue($value));
}
}

if($compound->count() == 0) { // pmmp now generates worlds with empty gamerules :O
foreach (self::getDefaultGameRules() as $rule => [$type, $value]) {
$compound->setString($rule, self::getStringFromValue($value));
}
}

$gameRules = [];

foreach (self::getAllGameRules() as $rule) {
if($compound->offsetExists($rule)) {
$value = self::getValueFromString($compound->getString($rule));
#0 plugins/MultiWorld.phar/src/czechpmdevs/multiworld/EventListener(92): czechpmdevs\multiworld\api\WorldGameRulesAPI::getLevelGameRules(object pocketmine\level\Level)
#1 src/pocketmine/plugin/MethodEventExecutor(38): czechpmdevs\multiworld\EventListener->onLevelLoad(object pocketmine\event\level\LevelLoadEvent)
#2 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object czechpmdevs\multiworld\EventListener, object pocketmine\event\level\LevelLoadEvent)
#3 src/pocketmine/event/Event(95): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\level\LevelLoadEvent)
#4 src/pocketmine/Server(1126): pocketmine\event\Event->call()
#5 plugins/MultiWorld.phar/src/czechpmdevs/multiworld/command/subcommand/LoadSubcommand(58): pocketmine\Server->loadLevel(string[3] sw1)
#6 plugins/MultiWorld.phar/src/czechpmdevs/multiworld/command/MultiWorldCommand(116): czechpmdevs\multiworld\command\subcommand\LoadSubcommand->executeSub(object pocketmine\command\ConsoleCommandSender, array[1], string[4] load)
#7 src/pocketmine/command/SimpleCommandMap(270): czechpmdevs\multiworld\command\MultiWorldCommand->execute(object pocketmine\command\ConsoleCommandSender, string[2] mw, array[1])
#8 src/pocketmine/Server(2025): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[11] mw load sw1)
#9 src/pocketmine/Server(1616): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[11] mw load sw1)
#10 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#11 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#12 src/pocketmine/Server(2345): pocketmine\snooze\SleeperHandler->sleepUntil(double 1585172248.8794)
#13 src/pocketmine/Server(2202): pocketmine\Server->tickProcessor()
#14 src/pocketmine/Server(1784): pocketmine\Server->start()
#15 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[9] /root/g1/, string[17] /root/g1/plugins/)
#16 src/pocketmine/PocketMine(295): pocketmine\server()
#17 (1): require(string[64] phar:///root/g1/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show