R Rdff

Create a complete Minecraft Skript punishment system that closely replicates the DonutSMP punishment system.

IMPORTANT: I want the actual DonutSMP-style punishment experience, NOT a generic punishment GUI.

  1. Punishment screen (VERY IMPORTANT)

When a banned player tries to join, display a professional Minecraft disconnect screen with this exact structure:

Failed to connect to the server

You are temporarily banned for [REASON]

Time Left: [REMAINING TIME]

Ban ID: [UNIQUE BAN ID]

You may be able to appeal this ban.

Make the text formatting, colors, spacing and overall appearance as close to DonutSMP as technically possible.

  1. Punishment command

/punish <player>

Open a professional GUI where staff can select:

  • Ban
  • Temporary Ban
  • Mute
  • Temporary Mute
  • Kick
  • Warning
  1. Punishment details
  • Custom punishment reasons.
  • Selectable durations.
  • Permanent and temporary punishments.
  • Unique Ban ID for every ban.
  • Display remaining punishment time.
  • Automatically expire temporary punishments.
  • Save punishment history.
  1. Commands
  • /punish <player>
  • /unban <player>
  • /unmute <player>
  • /baninfo <player>
  • /punishments <player>
  1. Design

Use a clean DonutSMP-inspired style, professional messages, colored text and attractive GUI menus.

  1. Technical requirements
  • Use Skript, not Java.
  • Compatible with Paper and Aternos.
  • Avoid unnecessary addons.
  • Use valid Skript syntax.
  • Make the punishment system persistent after server restarts.
  • Provide the complete working .sk file, not pseudocode.

Before coding, verify which features are possible with Skript alone and clearly list any required addons.

Kodari AI
KodariOct 30 at 1:45 pm 1
DonutPunishmentSystem
A comprehensive DonutSMP-style punishment system built entirely in Skript. Features a professional ban disconnect screen with unique Ban IDs, time remaining display, and appeal notice. Includes a /punish GUI with ban, temp-ban, mute, temp-mute, kick, and warning options. Custom reasons, selectable durations, permanent/temporary punishments, automatic expiration, persistent punishment history, and commands for unban, unmute, baninfo, and punishment history viewing. Clean DonutSMP-inspired design with professional colored messages and attractive GUI menus. Fully persistent across server restarts using YAML storage.

Skript alone can provide the punishment GUI, commands, persistent history, timed expiry, join-time bans, and chat mutes; no addons are required. One client-side limitation: Skript can set the disconnect message, but cannot control Minecraft’s screen title. A join-time kick may show “Disconnected” rather than “Failed to connect to the server”; the message body below follows the requested layout.

Save it as plugins/Skript/scripts/punishments.sk, then run /sk reload punishments. Permanent bans and timed bans are enforced by this script’s join handler; mutes block chat messages. The timed ban/mute durations are selectable in the GUI.

Kodari can make mistakes. Review important code before using.
Files
punishments.sk
Code
1 268
punishments.sk
options:
    prefix: &8[&cPunishments&8]&r
    staff-permission: punishments.staff

command /punish <offlineplayer>:
    permission: {@staff-permission}
    permission message: &cYou do not have permission to use this command.
    trigger:
        delete {ps.type::%uuid of player%}
        delete {ps.duration::%uuid of player%}
        set {ps.target::%uuid of player%} to arg-1
        set {ps.menu::%uuid of player%} to "main"
        open chest inventory with 3 rows named "&8Punishment Menu" to player
        set slot 10 of player's current inventory to red wool named "&cPermanent Ban"
        set slot 11 of player's current inventory to orange wool named "&6Temporary Ban"
        set slot 12 of player's current inventory to purple wool named "&5Permanent Mute"
        set slot 13 of player's current inventory to yellow wool named "&eTemporary Mute"
        set slot 14 of player's current inventory to iron sword named "&cKick"
        set slot 15 of player's current inventory to paper named "&eWarning"
        send "{@prefix} &7Choose a punishment for &f%name of arg-1%&7."

on inventory click:
    if name of event-inventory is "&8Punishment Menu":
        cancel event
        if {ps.menu::%uuid of player%} is "main":
            delete {ps.type::%uuid of player%}
            if event-slot is 10:
                set {ps.type::%uuid of player%} to "ban"
            else if event-slot is 11:
                set {ps.type::%uuid of player%} to "tempban"
            else if event-slot is 12:
                set {ps.type::%uuid of player%} to "mute"
            else if event-slot is 13:
                set {ps.type::%uuid of player%} to "tempmute"
            else if event-slot is 14:
                set {ps.type::%uuid of player%} to "kick"
            else if event-slot is 15:
                set {ps.type::%uuid of player%} to "warning"
            if {ps.type::%uuid of player%} is not set:
                stop
            if {ps.type::%uuid of player%} is "tempban" or {ps.type::%uuid of player%} is "tempmute":
                set {ps.menu::%uuid of player%} to "duration"
                open chest inventory with 3 rows named "&8Select Duration" to player
                set slot 10 of player's current inventory to paper named "&e1 hour"
                set slot 11 of player's current inventory to paper named "&e6 hours"
                set slot 12 of player's current inventory to paper named "&e1 day"
                set slot 13 of player's current inventory to paper named "&e3 days"
                set slot 14 of player's current inventory to paper named "&e7 days"
                set slot 15 of player's current inventory to paper named "&e30 days"
            else:
                set {ps.pending.reason::%uuid of player%} to true
                close player's inventory
                send "{@prefix} &7Type the punishment reason in chat. Type &ccancel &7to stop."
        stop

    if name of event-inventory is "&8Select Duration":
        cancel event
        if {ps.menu::%uuid of player%} is not "duration":
            stop
        if event-slot is 10:
            set {ps.duration::%uuid of player%} to 1 hour
        else if event-slot is 11:
            set {ps.duration::%uuid of player%} to 6 hours
        else if event-slot is 12:
            set {ps.duration::%uuid of player%} to 1 day
        else if event-slot is 13:
            set {ps.duration::%uuid of player%} to 3 days
        else if event-slot is 14:
            set {ps.duration::%uuid of player%} to 7 days
        else if event-slot is 15:
            set {ps.duration::%uuid of player%} to 30 days
        if {ps.duration::%uuid of player%} is not set:
            stop
        set {ps.pending.reason::%uuid of player%} to true
        close player's inventory
        send "{@prefix} &7Type the punishment reason in chat. Type &ccancel &7to stop."

on inventory drag:
    if name of event-inventory is "&8Punishment Menu" or name of event-inventory is "&8Select Duration":
        cancel event

on chat:
    if {ps.pending.reason::%uuid of player%} is set:
        cancel event
        if message is "cancel":
            delete {ps.pending.reason::%uuid of player%}
            delete {ps.type::%uuid of player%}
            delete {ps.duration::%uuid of player%}
            delete {ps.target::%uuid of player%}
            send "{@prefix} &7Punishment cancelled."
            stop
        set {_reason} to message
        set {_target} to {ps.target::%uuid of player%}
        set {_targetUUID} to uuid of {_target}
        set {_kind} to {ps.type::%uuid of player%}

        if {_kind} is "ban" or {_kind} is "tempban":
            if {ps.next-ban-id} is not set:
                set {ps.next-ban-id} to 0
            add 1 to {ps.next-ban-id}
            set {_banid} to "D-%{ps.next-ban-id}%"
            set {ps.ban.id::%{_targetUUID}%} to {_banid}
            set {ps.ban.reason::%{_targetUUID}%} to {_reason}
            if {_kind} is "tempban":
                set {ps.ban.expires::%{_targetUUID}%} to now + {ps.duration::%uuid of player%}
                delete {ps.ban.permanent::%{_targetUUID}%}
                set {_time} to "%{ps.duration::%uuid of player%}%"
            else:
                delete {ps.ban.expires::%{_targetUUID}%}
                set {ps.ban.permanent::%{_targetUUID}%} to true
                set {_time} to "Permanent"
            add "%now% | BAN | ID %{_banid}% | %{_time}% | %{_reason}%" to {ps.history::%{_targetUUID}%::*}
            loop all players:
                if uuid of loop-player is {_targetUUID}:
                    if {_kind} is "tempban":
                        set {_kick} to "&cYou are temporarily banned for &f%{_reason}%%nl%%nl%&fTime Left: &e%{_time}%%nl%%nl%&fBan ID: &e%{_banid}%%nl%%nl%&7You may be able to appeal this ban."
                    else:
                        set {_kick} to "&cYou are permanently banned for &f%{_reason}%%nl%%nl%&fTime Left: &ePermanent%nl%%nl%&fBan ID: &e%{_banid}%%nl%%nl%&7You may be able to appeal this ban."
                    kick loop-player due to {_kick}
            send "{@prefix} &7Ban applied to &f%name of {_target}%&7. &8(ID: &f%{_banid}%&8)"
        else if {_kind} is "mute" or {_kind} is "tempmute":
            set {ps.mute.reason::%{_targetUUID}%} to {_reason}
            if {_kind} is "tempmute":
                set {ps.mute.expires::%{_targetUUID}%} to now + {ps.duration::%uuid of player%}
                delete {ps.mute.permanent::%{_targetUUID}%}
                set {_time} to "%{ps.duration::%uuid of player%}%"
            else:
                delete {ps.mute.expires::%{_targetUUID}%}
                set {ps.mute.permanent::%{_targetUUID}%} to true
                set {_time} to "Permanent"
            add "%now% | MUTE | %{_time}% | %{_reason}%" to {ps.history::%{_targetUUID}%::*}
            loop all players:
                if uuid of loop-player is {_targetUUID}:
                    send "&cYou have been muted for &f%{_reason}%&c. &7Duration: &f%{_time}%" to loop-player
            send "{@prefix} &7Mute applied to &f%name of {_target}%&7."
        else if {_kind} is "kick":
            add "%now% | KICK | %{_reason}%" to {ps.history::%{_targetUUID}%::*}
            loop all players:
                if uuid of loop-player is {_targetUUID}:
                    kick loop-player due to "&cYou have been kicked.%nl%&7Reason: &f%{_reason}%"
            send "{@prefix} &7Kick applied to &f%name of {_target}%&7."
        else if {_kind} is "warning":
            add "%now% | WARNING | %{_reason}%" to {ps.history::%{_targetUUID}%::*}
            loop all players:
                if uuid of loop-player is {_targetUUID}:
                    send "&cYou have received a warning.%nl%&7Reason: &f%{_reason}%" to loop-player
            send "{@prefix} &7Warning issued to &f%name of {_target}%&7."

        delete {ps.pending.reason::%uuid of player%}
        delete {ps.type::%uuid of player%}
        delete {ps.duration::%uuid of player%}
        delete {ps.target::%uuid of player%}
        stop

    if {ps.mute.permanent::%uuid of player%} is true:
        cancel event
        send "&cYou are muted. &7Reason: &f%{ps.mute.reason::%uuid of player%}%"
        stop
    if {ps.mute.expires::%uuid of player%} is set:
        if {ps.mute.expires::%uuid of player%} is before now:
            delete {ps.mute.expires::%uuid of player%}
            delete {ps.mute.reason::%uuid of player%}
        else:
            cancel event
            send "&cYou are muted for &f%difference between {ps.mute.expires::%uuid of player%} and now%&c. &7Reason: &f%{ps.mute.reason::%uuid of player%}%"

on join:
    if {ps.ban.reason::%uuid of player%} is set:
        if {ps.ban.expires::%uuid of player%} is set:
            if {ps.ban.expires::%uuid of player%} is before now:
                delete {ps.ban.reason::%uuid of player%}
                delete {ps.ban.expires::%uuid of player%}
                delete {ps.ban.id::%uuid of player%}
                delete {ps.ban.permanent::%uuid of player%}
            else:
                set {_left} to difference between {ps.ban.expires::%uuid of player%} and now
                set {_kick} to "&cYou are temporarily banned for &f%{ps.ban.reason::%uuid of player%}%%nl%%nl%&fTime Left: &e%{_left}%%nl%%nl%&fBan ID: &e%{ps.ban.id::%uuid of player%}%%nl%%nl%&7You may be able to appeal this ban."
                wait 1 tick
                kick player due to {_kick}
        else:
            set {_kick} to "&cYou are permanently banned for &f%{ps.ban.reason::%uuid of player%}%%nl%%nl%&fTime Left: &ePermanent%nl%%nl%&fBan ID: &e%{ps.ban.id::%uuid of player%}%%nl%%nl%&7You may be able to appeal this ban."
            wait 1 tick
            kick player due to {_kick}

every 1 minute:
    loop {ps.ban.expires::*}:
        if loop-value is before now:
            delete {ps.ban.reason::%loop-index%}
            delete {ps.ban.expires::%loop-index%}
            delete {ps.ban.id::%loop-index%}
            delete {ps.ban.permanent::%loop-index%}
    loop {ps.mute.expires::*}:
        if loop-value is before now:
            delete {ps.mute.reason::%loop-index%}
            delete {ps.mute.expires::%loop-index%}
            delete {ps.mute.permanent::%loop-index%}

command /unban <offlineplayer>:
    permission: {@staff-permission}
    permission message: &cYou do not have permission to use this command.