Мова

GameruleLock

GameruleLock

Modrinth

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 changes, logging every correction.

2 завантажень оновлено 26d ago
Modrinth
Paper Purpur 1.20 – 1.21.1 Game-mechanicsManagementUtility

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

  • 🔒 Config-based locking — pin gamerule values per world, or for all worlds at once via a default block. Gamerules not listed in the config are never touched.
  • 🚦 Startup enforcement — all loaded worlds are checked when the plugin enables; any drift is reverted immediately.
  • 🌍 World-load enforcement — worlds loaded later (e.g. through Multiverse) go through the same check via WorldLoadEvent.
  • 🛡️ Optional runtime protection — with enforce-on-change: true, any conflicting change is reverted within one tick, whether it came from a player's /gamerule, the console, RCON, or another plugin. Whoever ran a conflicting command is told why their change was reverted; the command itself is never blocked.
  • 📝 Change log — every correction is written to the console and (optionally) appended to plugins/GameruleLock/changes.log with a timestamp, the world, the value found, the value written, and what triggered the check.
  • 📸 Snapshot command/grl capture writes the current gamerules of a world (or all worlds) straight into config.yml, so you never have to hand-write YAML.

🚀 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:

  • Values must match the gamerule's type — true/false for boolean rules, whole numbers for integer rules (e.g. randomTickSpeed: 3).
  • An unknown gamerule name or a wrong value type is skipped with a console warning; the rest of the config keeps working.
  • The effective locks for a world are the default block merged with that world's entry under worlds, with the world entry winning on conflicts.
  • Gamerules that appear nowhere in the config are left completely alone.

📄 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.

Версії

Історія версій недоступна. Натисни «Завантажити», щоб отримати останню версію з джерела.

Коментарі 0

Поки немає коментарів. Будь першим, хто поділиться думкою.

FAQ

Як встановити GameruleLock?

Завантажте файл під свою версію Minecraft і завантажувач із цієї сторінки, потім покладіть .jar у папку mods (або plugins) і запустіть гру.

GameruleLock безкоштовний?

GameruleLock можна завантажити безкоштовно на Modgrid — ми ведемо прямо до офіційного джерела.

Які версії Minecraft підтримує GameruleLock?

Працює з Paper, Purpur. Підтримуються версії 1.20–1.21.1. Перелік підтримуваних версій і завантажувачів — у блоці завантаження на цій сторінці.

Завантажити GameruleLock

Файли надаються напряму з першоджерела. Modgrid не зберігає та не змінює їх.