Skip to main content

Sanction Module

File: modules/sanction/config.yml

The Sanction module is a full-featured moderation system providing bans, mutes, kicks, freezes, and a complete sanction history per player. It includes configurable default reasons, protected player lists, and customizable material icons for the sanction history GUI.

MySQL Required

The Sanction module requires MySQL storage to function. It will not work with flat-file or SQLite storage. Make sure your database connection is properly configured before enabling this module.


Source Configuration

enable: true
protections:
- "Maxlego08"
- "Notch"
kick-default-reason: "You have been kicked"
ban-default-reason: "The ban hammer has spoken"
mute-default-reason: "You have to turn your tongue 7 times before speaking"
unmute-default-reason: "You have the right to talk to us"
unban-default-reason: "The ban hammer gives you the right to return"
date-format: "yyyy-MM-dd HH:mm:ss"
kick-material: IRON_INGOT
ban-material: DIAMOND
mute-material: EMERALD
unban-material: IRON_INGOT
unmute-material: COPPER_INGOT
warn-material: COAL
freeze-material: ICE
current-mute-material: EMERALD_BLOCK
current-ban-material: DIAMOND_BLOCK

Options

General Options

OptionTypeDefaultDescription
enableBooleantrueEnable or disable the Sanction module
protectionsList of Strings["Maxlego08", "Notch"]List of player names that cannot be sanctioned. Any ban, mute, kick, or freeze attempt against these players will be denied
date-formatStringyyyy-MM-dd HH:mm:ssThe date format used for displaying sanction timestamps. Follows Java SimpleDateFormat patterns

Default Reasons

OptionTypeDefaultDescription
kick-default-reasonStringYou have been kickedDefault reason applied when a player is kicked without specifying a reason
ban-default-reasonStringThe ban hammer has spokenDefault reason applied when a player is banned without specifying a reason
mute-default-reasonStringYou have to turn your tongue 7 times before speakingDefault reason applied when a player is muted without specifying a reason
unmute-default-reasonStringYou have the right to talk to usDefault reason recorded when a player is unmuted without specifying a reason
unban-default-reasonStringThe ban hammer gives you the right to returnDefault reason recorded when a player is unbanned without specifying a reason

Material Icons

These materials are used as item icons in the sanction history GUI inventory to visually distinguish different sanction types.

OptionTypeDefaultDescription
kick-materialMaterialIRON_INGOTItem material representing kick entries in the sanction history
ban-materialMaterialDIAMONDItem material representing ban entries in the sanction history
mute-materialMaterialEMERALDItem material representing mute entries in the sanction history
unban-materialMaterialIRON_INGOTItem material representing unban entries in the sanction history
unmute-materialMaterialCOPPER_INGOTItem material representing unmute entries in the sanction history
warn-materialMaterialCOALItem material representing warn entries in the sanction history
freeze-materialMaterialICEItem material representing freeze entries in the sanction history
current-mute-materialMaterialEMERALD_BLOCKItem material representing an active (current) mute in the sanction history
current-ban-materialMaterialDIAMOND_BLOCKItem material representing an active (current) ban in the sanction history
tip

The block variants (EMERALD_BLOCK, DIAMOND_BLOCK) are used for active sanctions, making it easy for moderators to visually distinguish between past and current bans/mutes in the history GUI.


How It Works

  1. A moderator issues a sanction command (e.g., /ban, /mute, /kick, /freeze).
  2. The plugin checks if the target player is in the protections list. If so, the action is denied.
  3. The sanction is applied to the target player and stored in the MySQL database with a timestamp, reason, and issuer.
  4. If no reason is provided, the corresponding default reason is used.
  5. Moderators can review a player's full sanction history using the /sanction command, which opens a GUI with material-coded entries.

CommandAliasesPermissionDescription
/banessentials.banBan a player from the server
/unbanessentials.unbanUnban a previously banned player
/muteessentials.muteMute a player, preventing them from chatting
/unmuteessentials.unmuteUnmute a previously muted player
/kickessentials.kickKick a player from the server
/kickallessentials.kickallKick all players from the server
/freezeessentials.freezeFreeze a player, preventing them from moving
/sanctionscessentials.sanctionView the sanction history for a player
/seenwhoisessentials.seenView player information and last login
/seenipwhoisipessentials.seenipLook up players by IP address

For the full command list, see Commands & Permissions.


PlaceholderDescription
%zessentials_user_is_mute%Returns true if the player is currently muted
%zessentials_user_mute_seconds%Returns the remaining mute duration in seconds
%zessentials_user_mute_formatted%Returns the remaining mute duration in a human-readable format
%zessentials_user_target_is_ban%Returns true if the target player is currently banned
%zessentials_user_target_is_mute%Returns true if the target player is currently muted

For the full placeholder list, see Placeholders.

warning

The %zessentials_user_target_is_ban% and %zessentials_user_target_is_mute% placeholders operate on a target player context, not the requesting player. They are typically used in sanction-related GUIs or commands where a moderator is inspecting another player.


Protected Players

The protections list prevents specific players from being sanctioned by any moderator, including those with full permissions. This is useful for protecting server owners or system accounts from accidental or malicious sanctions.

protections:
- "Maxlego08"
- "Notch"
note

Protection is matched by player name (case-sensitive). Make sure the names in the list exactly match the in-game names of the players you want to protect.

Copyright © 2026 GroupeZ|Build #loading...|-