CraftersStaff icon

CraftersStaff -----

Advanced staff system



CraftersStaff - 10.7.9
CraftersStaff v10.7.9 — Sanctions Webhooks & LibertyBans Integration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Summary
  • More flexible and granular sanctions webhook integration.
  • New sanction types: UNMUTE and UNWARN with 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: UNMUTE and UNWARN.
  • Per-type enabled: true/false check before sending each webhook.
  • Support for webhook-url (endpoint) and link (embed URL), with url as backwards compatibility fallback.
️ Sanctions Command Observer
  • Maps commands to sanction types and fires the webhook:
    • ban/tempban/ipban → BAN (or BANIP if contains ip)
    • mute/tempmute/ipmute → MUTE
    • unban/pardon → UNBAN
    • unmute → UNMUTE
    • warn → WARN
    • unwarn → UNWARN
⚖️ LibertyBans Integration (Reflective)
  • Hook to PunishEvent via Omnibus to capture sanction data without compile-time dependency.
  • ID capture temporarily disabled (sends null) for multi-version stability.
  • LibertyBans added to softdepend in plugin.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 ConsoleUtil with the internal prefix [CraftersStaff], without using or duplicating general.prefix.
Safe Update Fallback
  • If general.update-available is missing from language files, a default message is used.
Conflict-free Command Aliases
  • A cstaff_<name> alias is automatically added for every command loaded from commands.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; url still works as fallback)
    • link – clickable embed title URL (new)
    • title, description, content, color
  • New sections for unmute and unwarn with their own titles, descriptions and colors.
  • ID removed from templates temporarily (capture disabled for stability).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Webhook Send Flow
  1. A staff member executes a sanction command (or LibertyBans fires the event).
  2. SanctionsCommandListener (or LibertyBansHook) interprets type, target, staff, duration and reason.
  3. SanctionsWebhookManager checks if the type is enabled, resolves webhook-url and link, builds the embed and sends it.
  4. On HTTP error, the log shows the code and Discord's response body.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quick Testing Guide
  1. Set webhook-url for the desired types in sanctions-webhooks.yml. Optionally set link and enabled.
  2. Restart the server.
  3. Run e.g. /mute <player> 10m test and check your Discord channel.
  4. Test /unmute <player> and /unwarn <player> to see the new embeds.
  5. Set a type to enabled: false and 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.
----------, Mar 2, 2026
Resource Information
Author:
----------
Total Downloads: 65
First Release: Feb 2, 2026
Last Update: Mar 12, 2026
Category: ---------------
All-Time Rating:
0 ratings
Find more info at craftersstaff.pages.dev...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings