Skip to content
home/templates/mute & warn system
moderationIntermediatemc 1.20.x – 1.21.x35 lines

mute & warn system

/mute /unmute /warn /warns. warns stack and auto-mute at 3. mutes block chat with a server message.

vanilla Skriptno addons required.
mute-warn.sk35 lines
command /mute <player> <integer>:
    permission: mod.mute
    trigger:
        set {mute.until.%uuid of arg-1%} to arg-2 minutes from now
        send "&cYou have been muted for &e%arg-2% &cminutes." to arg-1
        send "&aMuted &e%arg-1% &afor %arg-2% minutes." to player

command /unmute <player>:
    permission: mod.mute
    trigger:
        delete {mute.until.%uuid of arg-1%}
        send "&aUnmuted &e%arg-1%&a." to player

command /warn <player> <text>:
    permission: mod.warn
    trigger:
        add 1 to {warns.%uuid of arg-1%}
        set {_count} to {warns.%uuid of arg-1%}
        send "&c⚠ You received a warning: &f%arg-2% &7(%{_count}%/3)" to arg-1
        broadcast "&c%arg-1% was warned: &f%arg-2%"
        if {_count} >= 3:
            set {mute.until.%uuid of arg-1%} to 60 minutes from now
            set {warns.%uuid of arg-1%} to 0
            broadcast "&c%arg-1% was auto-muted for 1 hour (3 warnings reached)."

command /warns <player>:
    trigger:
        send "&e%arg-1% &7has &c%{warns.%uuid of arg-1%} ? 0% &7warnings." to player

on chat:
    if {mute.until.%uuid of player%} is set:
        if {mute.until.%uuid of player%} > now:
            cancel event
            send "&cYou are muted. Remaining: &e%difference between now and {mute.until.%uuid of player%}%" to player

get it running

mute-warn.sk · 35 lines · vanilla Skript
  1. 1

    copy or download

    grab the .sk file with the buttons up top.

    mute-warn.sk· ready to drop in
  2. 2

    drop it in your scripts folder

    save it exactly here on your server — no typos, just copy the path:

    …/plugins/Skript/scripts/mute-warn.sk
  3. 3

    reload in-game

    run this in chat or console — your script goes live instantly:

    /sk reload mute-warn
that's it — your script is live. hop in-game to try it.
/ related templates

more moderation templates

comments