Game Rules
Gamerule-style world settings in one file: keep inventory, fall damage, PvP, death penalties, mob spawning, fire, and day length. Change them live with /gamerules set or in gamerules.properties. Server-side only.
Rules
| Rule | Values | What it does |
|---|---|---|
pvp |
true, false | Players can hurt each other |
fallDamage |
true, false | Falling hurts |
keepInventory |
true, false | Players keep their items on death. Gear still loses durabilityLossPercent |
itemLossPercent |
0 to 100 | Share of each stack dropped on death when keepInventory is false |
durabilityLossPercent |
0 to 100 | Durability lost by carried gear on death |
mobSpawning |
true, false | NPCs spawn on their own |
fireSpread |
true, false | Fire burns and spreads. False freezes it: existing fire neither spreads nor goes out |
daylightCycle |
true, false | The clock runs. False freezes the time of day |
dayLength |
10 to 86400 | Daytime length in real seconds |
nightLength |
10 to 86400 | Nighttime length in real seconds |
The usual "keep everything" setup is keepInventory=true and durabilityLossPercent=0.
Commands
Operators and the console only.
| Command | What it does |
|---|---|
/gamerules list [world] |
Every rule and its value right now |
/gamerules set <rule> <value> [world] |
Change a rule, for all worlds or for one |
/gamerules unset <rule> [world] |
Stop managing a rule. The world keeps its current value |
/gamerules reload |
Read the file again after editing it |
The settings file
gamerules.properties in the mod's data directory lists every rule at the top. rule=value applies to all worlds, and world.<name>.rule=value to one, which wins. A rule that is not in the file is left exactly as the server has it, so nothing changes until you set something.
Rules are written into each world when it loads, so new worlds follow the file too. They are saved in the world's own config.json as well, so a value stays after you remove the mod.
Why these rules
Every rule here changes a setting the server itself reads, so the mod does no work per tick or per hit. The server's own /world settings already covers PvP, mob spawning, paused time and disabled fluids, one world at a time. This mod adds fall damage, the death settings and day and night length, which have no command, and keeps everything in one file for all your worlds.
Two rules people ask for are not here because there is no world setting to change: durability loss from using tools, and block damage from explosions, which each explosive sets for itself.
Limits
dayLengthandnightLengthhave no public setter on the server, so the mod sets the value by reflection. A future server could change that. If it does, the rule reports an error and nothing else is affected.- Fire frozen by
fireSpread=falsedid not start updating again in the seconds after setting the rule back to true. - Tested on server 0.7.5 with server-side test players, not with a game client. Each rule's effect was measured there: damage, items and durability after real deaths, NPC counts and the server clock. How the sky looks to a player during a
dayLengthchange has not been seen. ForfallDamagethe test fed the landing into the server's fall damage system. A sheep dropped 40 blocks took no damage with the rule on or off, so NPC fall damage has not been seen working. ForfireSpread, fire that would have gone out stayed in place; burning through plants has not been tested. - On 0.8.0-pre.3 it compiles, passes Update-Ready Check and loads, but only in bare mode without game assets. The rules themselves were not run there.
Install: drop the jar into the server's mods/ folder and restart. Licence: MIT.
Not affiliated with, endorsed by or connected to Hypixel Studios.
Need something custom? I build small server plugins to order from $35 (fixes) and $90 (a new one-feature plugin): https://ko-fi.com/molonlav3/commissions . If this mod saved you time, a coffee helps keep the updates coming: https://ko-fi.com/molonlav3
Updating Hytale? See which mods work with Update 8: https://playerbase-servers.molonlav3.workers.dev/update-8

