MonitoringMinecraft MonitoringMinecraft

GameruleLock

Плагин PaperPurpur

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.

6 скачиваний 0 подписчиков
Оцените первым

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.

Смотри также

Похожие подборки плагины — по версиям Майнкрафта, загрузчикам и жанрам.

Сервера Майнкрафт

Играть интереснее на сервере — выбирай в рейтинге серверов Майнкрафт и заходи прямо сейчас.

SkyBars
SkyBars Java + BE
252 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
MineLandy
MineLandy Java + BE
20 онлайн
1.12.2 — 26.1.2 версия
Ванила и анархия без приватов — полная свобода действий и честное выживание
beesmp
beesmp Java
1 онлайн
26.2 — 1.21.11 версия
Bee smp-улей,где каждый оставляет свой след
WahaCraft
WahaCraft Лаунчер
1 онлайн
Кланы | Боссы | RPG | Уникальная карта | PVP | Захват территорий | ВАРХАММЕР
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.16.5. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат