
CraftersStaff
Complete staff management solution with vanish, freeze, alerts, Discord integration, and customizable menus for Minecraft servers.
302
2
Список изменений
CraftersStaff v10.7.9 — Sanctions Webhooks & LibertyBans Integration
📋 Summary
- More flexible and granular sanctions webhook integration.
- New sanction types:
UNMUTEandUNWARNwith their own templates. - Per-type toggles (
enabled: true/false) to easily enable/disable each webhook. - Clear separation between the Discord endpoint (
webhook-url) and the embed clickable link (link). - Reinforced webhook client: correct JSON escaping and HTTP error body logging.
- Command observer for sanctions (ban/mute/warn/kick/unban/unmute/unwarn).
- Reflective LibertyBans hook (PunishEvent) prepared; ID capture temporarily disabled.
- Unified console prefix (no duplicates), independent of
general.prefix. - Safe "update available" message with fallback.
- Safe
cstaff_aliases to avoid command name conflicts.
⚙️ Technical Changes
🔨 Sanctions Manager
- New types:
UNMUTEandUNWARN. - Per-type
enabled: true/falsecheck before sending each webhook. - Support for
webhook-url(endpoint) andlink(embed URL), withurlas backwards compatibility fallback.
👁️ Sanctions Command Observer
- Maps commands to sanction types and fires the webhook:
- ban/tempban/ipban →
BAN(orBANIPif containsip) - mute/tempmute/ipmute →
MUTE - unban/pardon →
UNBAN - unmute →
UNMUTE - warn →
WARN - unwarn →
UNWARN
- ban/tempban/ipban →
⚖️ LibertyBans Integration (Reflective)
- Hook to
PunishEventvia Omnibus to capture sanction data without compile-time dependency. - ID capture temporarily disabled (sends
null) for multi-version stability. LibertyBansadded tosoftdependinplugin.yml.
🌐 Discord Webhook Client
- Correct escaping of JSON characters (quotes, slashes, newlines, control unicode).
- Error body reading on HTTP 4xx/5xx responses for clear diagnostics.
🖥️ Unified Console Prefix
- All logs go through
ConsoleUtilwith the internal prefix[CraftersStaff], without using or duplicatinggeneral.prefix.
🔄 Safe Update Fallback
- If
general.update-availableis missing from language files, a default message is used.
🔗 Conflict-free Command Aliases
- A
cstaff_<name>alias is automatically added for every command loaded fromcommands.yml.
📁 Configuration Changes
New file: sanctions-webhooks.yml
- Global:
sanctions-webhook.enabled– enables/disables all sanction webhooks.sanctions-webhook.use-embed– use embed or simple message.
- Per type (ban, mute, unmute, kick, warn, unwarn, unban, banip):
enabled: true/false(new)webhook-url– Discord endpoint (new;urlstill works as fallback)link– clickable embed title URL (new)title,description,content,color
- New sections for
unmuteandunwarnwith their own titles, descriptions and colors. IDremoved from templates temporarily (capture disabled for stability).
🔁 Webhook Send Flow
- A staff member executes a sanction command (or LibertyBans fires the event).
SanctionsCommandListener(orLibertyBansHook) interprets type, target, staff, duration and reason.SanctionsWebhookManagerchecks if the type is enabled, resolveswebhook-urlandlink, builds the embed and sends it.- On HTTP error, the log shows the code and Discord's response body.
🧪 Quick Testing Guide
- Set
webhook-urlfor the desired types insanctions-webhooks.yml. Optionally setlinkandenabled. - Restart the server.
- Run e.g.
/mute <player> 10m testand check your Discord channel. - Test
/unmute <player>and/unwarn <player>to see the new embeds. - Set a type to
enabled: falseand repeat — that webhook should not fire.
📝 Final Notes
The webhook system is now modular per type and more resilient against API errors. LibertyBans ID capture will be re-enabled once the stable API for version 1.1.2 is confirmed in your environment. In the meantime, ID will not appear in embeds to avoid empty placeholders.
Метаданные
Канал релиза
Release
Номер версии
10.7.9
Загрузчики
BukkitBungeeCordPaperSpigotVelocity
Версии игры
1.16–1.21.5
Загрузок
23
Дата публикации
3 мес. назад

