menu
#5776834 Unable to encode value (0) for rule spawnRadius.

Submitted by PocketMine-MP 4.0.6

General information

Version: 4.0.6
Git commit: f7d25f25
Plugin involvement: Direct
Report date: 2022-01-14 20:41:13 +0000 UTC
Server uptime: 0 days 0 hours 3 minutes 1 seconds

System Information

PHP version: 8.0.13
Operating system: linux
System banner: Linux babd879ddc39 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64

Error information

Warning: the MultiWorld plugin was directly involved in this crash. Please contact the plugin author.
Message: Unable to encode value (0) for rule spawnRadius.
File: plugins/MultiWorld.phar/src/czechpmdevs/multiworld/world/gamerules/GameRules
Line: #124
Error level: UnexpectedValueException
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
	 */
public static function serializeGameRules(GameRules $gameRules): CompoundTag {
$nbt = new CompoundTag();
/** @var BoolGameRule|IntGameRule|FloatGameRule $gameRule */
foreach($gameRules->getRules() as $name => $gameRule) {
if($value = json_encode($gameRule->getValue())) {
$nbt->setString($name, $value);
continue;
}
throw new UnexpectedValueException("Unable to encode value ({$gameRule->getValue()}) for rule $name.");
}

return $nbt;
}

/**
* Unserializes GameRules from World Provider
*/
public static function unserializeGameRules(CompoundTag $nbt): GameRules {
$rules = [];
#0 plugins/MultiWorld.phar/src/czechpmdevs/multiworld/world/gamerules/GameRules(109): czechpmdevs\multiworld\world\gamerules\GameRules::serializeGameRules(object czechpmdevs\multiworld\world\gamerules\GameRules#111998)
#1 plugins/MultiWorld.phar/src/czechpmdevs/multiworld/world/gamerules/GameRules(174): czechpmdevs\multiworld\world\gamerules\GameRules::saveForWorld(object pocketmine\world\World#23570, object czechpmdevs\multiworld\world\gamerules\GameRules#111998)
#2 plugins/MultiWorld.phar/src/czechpmdevs/multiworld/command/GameRuleCommand(112): czechpmdevs\multiworld\world\gamerules\GameRules->applyToWorld(object pocketmine\world\World#23570)
#3 pmsrc/src/command/SimpleCommandMap(220): czechpmdevs\multiworld\command\GameRuleCommand->execute(object pocketmine\player\Player#25376, string[8] gamerule, array[2])
#4 pmsrc/src/Server(1406): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#25376, string[22] gamerule spawnradius 0)
#5 plugins/MultiWorld.phar/src/czechpmdevs/multiworld/EventListener(180): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#25376, string[22] gamerule spawnradius 0)
#6 pmsrc/src/event/RegisteredListener(75): czechpmdevs\multiworld\EventListener->onDataPacketReceive(object pocketmine\event\server\DataPacketReceiveEvent#115228)
#7 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\server\DataPacketReceiveEvent#115228)
#8 pmsrc/src/network/mcpe/NetworkSession(394): pocketmine\event\Event->call()
#9 pmsrc/src/network/mcpe/NetworkSession(358): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\SettingsCommandPacket#114919, string[27] .../gamerule spawnradius 0.)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(192): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[30] ..a..OO.M-*.IU(.H,.+JL.,-V0`..)
#11 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(integer 0, string[39] ...b!..M2]...1.X.....G.."x.............)
#12 pmsrc/src/network/mcpe/raklib/RakLibInterface(122): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#23828)
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#15 pmsrc/src/Server(1657): pocketmine\snooze\SleeperHandler->sleepUntil(double 1642192873.6941)
#16 pmsrc/src/Server(1044): pocketmine\Server->tickProcessor()
#17 pmsrc/src/PocketMine(303): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[8] /server/, string[16] /server/plugins/)
#18 pmsrc/src/PocketMine(326): pocketmine\server()
#19 pmsrc(11): require(string[45] phar:///server/server.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show