SnCrates v2.2.0
Changes
New: /crates key wipe [crate] [confirm]
Deletes the virtual key balances of every player on the server, offline players
included. Without a crate id it clears every crate; with one it clears only that crate.
Physical key items are untouched - they live in inventories and no balance command reaches them.
It cannot be undone, so it runs in two halves. Without the confirmation word the command
only counts: it reports how many balances and how many keys are at stake and quotes back the
exact line that would destroy them. Only a second invocation carrying that word deletes anything.
/crates key wipe
> WARNING This deletes 4,120 virtual key(s) across 1,284 balance(s), for EVERY player
> and EVERY crate. It cannot be undone. Run /crates key wipe confirm to go through with it.
/crates key wipe confirm
> Wiped 1,284 virtual key balance(s), for every player and every crate.
- The confirmation word lives in the language file (
messages.keys.wipe-confirm-word,
defaultconfirm), so it translates with the rest of the plugin. It is never
tab-completed - having to type it is the safety. - Online players' cached balances are cleared too, so nobody keeps spending keys that no
longer exist anywhere. - A mistyped crate id is refused rather than silently widening into a server-wide wipe.
- Works on a crate that no longer accepts virtual keys: those leftover rows are exactly what
this is for.
New permission
sncrates.admin.wipekeys (default op, child of sncrates.admin). Required on top of
sncrates.admin.keys, so the ordinary key commands can be delegated to a junior admin
without handing them the one that empties the key economy.
New language keys
messages.keys.wipe-confirm-word, wipe-warning, wipe-warning-crate, wiped,
wiped-crate, wipe-nothing, wipe-nothing-crate, wipe-failed. They merge into an
existing lang/messages_en.yml on boot; your edits are kept.
Installation
Download the JAR below and place in your plugins folder. Requires SnLib.jar.