CraftersStaff - 10.7.9
Details
-
FilenameCraftersStaff-v10.7.9.jar
-
Uploaded by
-
UploadedMar 1, 2026
-
Size1.26 MB
-
Downloads13
-
MD598e2fce9caf2dbe5751d320204827d13
Supported Bukkit Versions
- 1.21.5
- 1.21.1
- 1.21.2
- 1.21.3
- 1.21.4
- 1.21
- 1.20.6
- 1.20.5
- 1.20.4
- 1.20.3
- 1.20.2
- 1.20.1
- 1.20
- 1.19.4
- 1.19.3
- 1.19.2
- 1.19.1
- 1.19
- 1.18.2
- 1.18.1
- 1.18
- 1.17
- 1.16
Changelog
[B]CraftersStaff v10.7.9[/B] — Sanctions Webhooks & LibertyBans Integration
[B]Summary[/B]
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.
[B]Sanctions Manager[/B]
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.
[B]Sanctions Command Observer[/B]
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
[B]LibertyBans Integration (Reflective)[/B]
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.
[B]Discord Webhook Client[/B]
Correct escaping of JSON characters (quotes, slashes, newlines, control unicode).
Error body reading on HTTP 4xx/5xx responses for clear diagnostics.
[B]Unified Console Prefix[/B]
All logs go through ConsoleUtil with the internal prefix [CraftersStaff], without using or duplicating general.prefix.
[B]Safe Update Fallback[/B]
If general.update-available is missing from language files, a default message is used.
[B]Conflict-free Command Aliases[/B]
A cstaff_name alias is automatically added for every command loaded from commands.yml.
[B]Configuration Changes[/B]
New file: sanctions-webhooks.yml
Global: sanctions-webhook.enabled enables/disables all sanction webhooks. sanctions-webhook.use-embed uses 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).
[B]Webhook Send Flow[/B]
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.
[B]Quick Testing Guide[/B]
1. Set webhook-url for the desired types in sanctions-webhooks.yml. Optionally set link and enabled.
2. Restart the server.
3. Run /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.
[B]Final Notes[/B]
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.