GameRulesWorldData 5.47.0
Extends WorldData
World data which stores game rules (see \pocketmine\world\GameRules). Kept out of WorldData so that world providers written by plugins against the original interface keep working; worlds whose data doesn't implement it keep their rules in memory only (defaults on every load).
Methods
getGameRule()
php
public function getGameRule(string $name) : bool|int|nullReturns the stored value of a game rule, or null if the world data has none (the default applies).
setGameRule()
php
public function setGameRule(string $name, bool|int $value) : void