HomeJavaModsGameruleLock
GameruleLock
ModsJava

GameruleLock

Pin your gamerules in a config file and keep them there — GameruleLock re-applies your chosen values on startup, world load, and even after runtime…

⬇ Download on Modrinth

GameruleLock

Lock your gamerules to the values you chose — permanently.

GameruleLock verifies every gamerule you pin in its config on server startup and on every world load, writes the configured value back whenever it deviates, and logs each correction. No more "why is keepInventory off again?" panic after a restart, a world import, or a well-meaning admin's /gamerule command.

✨ Features

🚀 Installation

  1. Download the GameruleLock jar.
  2. Drop it into your server's plugins/ folder.
  3. Restart the server. The default plugins/GameruleLock/config.yml is created.
  4. Either edit config.yml by hand, or set your gamerules in game the way you want them and run /grl capture all to lock everything in as-is.

Requirements: Paper (or a Paper fork) for Minecraft 1.20.x–1.21.x, Java 21. Only stable Bukkit/Paper API is used — no NMS, no reflection.

⌨️ Commands

Main command: /grl (alias: /gamerulelock).

Command Description Permission
/grl check [world] Compare current values against the locked ones and list deviations (changes nothing) gamerulelock.check
/grl enforce [world] Run enforcement now and revert any deviations gamerulelock.enforce
/grl capture <world|all> Snapshot current gamerule values into config.yml and save the file gamerulelock.capture
/grl reload Reload config.yml, then run enforcement gamerulelock.reload

All permissions default to op.

⚙️ Configuration

# Revert runtime changes (player /gamerule, console, RCON, other plugins)
# that conflict with a locked value? Commands are not blocked; the value is
# corrected within one tick.
enforce-on-change: true

# Also append corrections to plugins/GameruleLock/changes.log?
# (Console logging is always on.)
log-to-file: true

# Send a short summary to online operators whenever corrections are made?
notify-ops: true

# Locks applied to every world.
default:
  keepInventory: true
  doFireTick: false

# Per-world locks. These override the "default" block for that world.
worlds:
  world_nether:
    doMobSpawning: false

Notes:

📄 Change log file

When log-to-file is enabled, every correction is appended to plugins/GameruleLock/changes.log as one plain-text line:

2026-07-21 14:03:12 [startup] world: keepInventory false -> true

The trigger tag is one of startup, world-load, runtime (a runtime change was reverted) or manual (/grl enforce / /grl reload). File writes happen off the main thread, so logging never costs you ticks.

🎯 What GameruleLock deliberately does not do

No GUI, no database, no web panel, and no locking of non-gamerule settings such as difficulty or spawn flags. It does one thing: keep your gamerules where you put them.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more