
OPShield
Protects your server from OP/admin abuse with console-only OP (via password) and optional admin command restriction.
112
1
Список изменений
[1.5.0] — 2026-04-19
Bug fixes
Medium severity
sensitiveCommandHistorynow persisted todata.yml— the auto-punishment rolling window survived previously only in memory, allowing players to bypass the threshold by timing restarts or crashes. Timestamps are now written on every dirty flush and restored on startup; stale entries outside the configured window are discarded automatically on load.- Shadow-ban level escalation is now enforced —
playerShadowBanLevelwas incremented and stored but never acted upon. A new config keyshadow_ban.auto_punish_level(default3) defines the threshold at which the level triggers realauto_punishmentand then resets. Requiresauto_punishment.enabled: true. - Firewall script no longer blocks the main thread —
executeFirewallBlockpreviously calledRuntime.getRuntime().exec()synchronously, which could freeze the server if the script was slow. It now runs asynchronously viaProcessBuilderwith a configurable hard timeout (auto_punishment.firewall_timeout_seconds, default10). The player is kicked immediately on the main thread; the OS script executes in the background.
Low severity
unlockIdentifier()now clearssensitiveCommandHistory— previously,/opshield unlockcleared all other tracking maps but leftsensitiveCommandHistoryintact, causing inconsistent state after a manual unlock.getMsgPlain()replaced fragile color-strip logic — manualreplace('&X', "")calls missed several color codes and decorators. Now uses Adventure'sPlainTextComponentSerializerfor correct, future-proof plain-text extraction.- Multi-file audit log rotation —
AuditLoggerpreviously kept only one backup file (audit.log.1), permanently overwriting it on every rotation. Rotation now shifts files:audit.log.1→audit.log.2→ … →audit.log.N. Controlled byaudit.log_retention(default3). - Config validation for
auto_punishment.command— an unrecognized mode with nocustom_commandset now prints a clear console warning on load and reload instead of silently falling back to a potentially unexpected behaviour.
New config keys
| Key | Default | Description |
|---|---|---|
shadow_ban.auto_punish_level | 3 | Shadow-ban level threshold that triggers auto-punishment |
audit.log_retention | 3 | Number of rotated audit log backup files to keep |
auto_punishment.firewall_timeout_seconds | 10 | Max seconds before a hung firewall script is force-killed |
Файлы
opshield-1.5.0.jar(35.27 KiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
1.5.0
Загрузчики
PaperPurpur
Версии игры
1.21–1.21.11
Загрузок
3
Дата публикации
3 нед. назад
