Game rules
/gamerule works like in Bedrock. Each world keeps its own rules in its level.dat, so worlds made with Minecraft keep theirs, and a rule changed in one world does not change the others.
/gamerule list the rules of your world
/gamerule keepinventory show one rule
/gamerule keepinventory true change it
/gamerule pvp false lobby change it in another loaded worldThe console uses the default world unless a world is named. Permission: pocketmine.command.gamerule (operators).
Rules only set the default outcome: plugins still get the events (deaths, damage, block breaking, explosions) and can change the result.
Rules
| Rule | Default | Effect |
|---|---|---|
dodaylightcycle | true | Time of day advances. |
doweathercycle | true | Weather changes by itself. |
domobspawning | true | Mobs spawn naturally. |
doinsomnia | true | Phantoms spawn for players who haven't slept. |
dopatrolspawning | true | Pillager patrols spawn. |
dotraderspawning | true | Wandering traders spawn. |
dofiretick | true | Fire spreads and burns out. |
domobloot | true | Mobs drop items and experience. |
dotiledrops | true | Broken blocks drop items. |
doentitydrops | true | Entities such as minecarts and boats drop their item. |
doimmediaterespawn | false | Skip the death screen. |
keepinventory | false | Players keep items and experience when they die. |
naturalregeneration | true | Players heal when their hunger bar is full. |
mobgriefing | true | Mobs change blocks (creeper explosions, endermen…). |
tntexplodes | true | TNT explodes. |
tntexplosiondropdecay | false | true: only some of the blocks broken by TNT drop. |
projectilescanbreakblocks | true | Projectiles break blocks such as pointed dripstone and decorated pots. |
respawnblocksexplode | true | Beds outside the Overworld and respawn anchors outside the Nether explode. |
pvp | true | Players can hurt each other. |
falldamage / firedamage / drowningdamage / freezedamage | true | Each kind of damage applies. |
showcoordinates | false | Coordinates on screen. |
showdaysplayed | false | Days played on screen. |
showdeathmessages | true | Death messages in chat. |
showtags / showbordereffect / showrecipemessages | true | Client display options (item tooltips, border particles, recipe toasts). |
locatorbar | true | The bar showing the direction of the other players. |
recipesunlock | true | Recipes are unlocked as you play (false: all of them from the start). |
dolimitedcrafting | false | Only unlocked recipes can be crafted. |
randomtickspeed | 1 | Multiplies how fast crops grow, leaves decay, etc. (0 stops it). |
playerssleepingpercentage | 100 | Share of the players who must sleep to skip the night. |
spawnradius | 10 | Blocks around the world spawn where new players appear. |
commandblocksenabled, commandblockoutput, sendcommandfeedback, maxcommandchainlength, functioncommandlimit | Command rules, kept with the world like in Bedrock. |
Related settings
mobs.disabled-worldsin pocketmine.yml: worlds with no mobs at all (no AI, spawning, patrols or raids), for lobbies. To only stop natural spawning, use/gamerule domobspawning falsein that world.difficultyandhardcorein server.properties.
