Simple Staff Chat 1.2

Light-weight, fully customizable staff chat for your server.

  1. Sourblock
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.8
    • 1.14
    • 1.15
    • 1.16
    Screen Shot 2020-07-06 at 12.05.33 PM.png
    Simple Staff Chat

    Very light-weight, easy to read, simple, strait-forward staff chat Skript.

    No dependancies other than Skript

    Custom staff chat prefix (if you start a message with a certain character, and have permission it will forward your message to staff chat)

    Custom staff chat format, color, permission, etc.

    Commands:
    ! (or whatever the prefix is set too) <message>
    /sc (aliases: staffchat, staffmessage) <message>
    /sc on
    /sc off
    /sc help

    Skript:
    Code (Text):

    # #################################################################

    options:
        StaffMessagePrefix: !
     
        ErrorMessage: &cYou do not have permission to use staffchat!
     
        StaffChatPermission: staffchat.use
     
        StaffChatPrefix: &b[Staff Chat]
     
        StaffChatColor: &b

    # #################################################################

    on chat:
        if message starts with "{@StaffMessagePrefix}":
            if player has permission "{@StaffChatPermission}":
                cancel event
                loop all players:
                    if loop-player has permission "{@StaffChatPermission}":
                        # MODIFY THE NEXT LINE TO CHANGE CHAT FORMAT
                        send "{@StaffChatPrefix}&r %player%:&b%coloured subtext of message from characters 2 to (length of message)%" to loop-player
            else:
                send "{@ErrorMessage}" to player

    command /sc [<text>]:
        permission: {@StaffChatPermission}
        aliases: staffchat, staffmessage
        trigger:
            if arg-1 is "help":
                send "&bCorrect usage: /sc <message> or {@StaffMessagePrefix} <message>" to player
            else:
                if arg-1 is not set:
                    send "&bCorrect usage: /sc <message> or {@StaffMessagePrefix} <message>" to player
                else:
                    if arg-1 is "on":
                        if player has permission "{@StaffChatPermission}":
                            set {staffchat.%player%} to true
                            send "{@StaffChatColor}Staff chat &aenabled{@StaffChatColor}!" to player
                        else:
                            send "{@ErrorMessage}"
                    else:
                        if arg-1 is "off":
                            if player has permission "{@StaffChatPermission}":
                                delete {staffchat.%player%}
                                send "{@StaffChatColor}Staff chat &cdisabled{@StaffChatColor}!" to player
                            else:
                                send "{@ErrorMessage}"
                        else:
                            loop all players:
                                if loop-player has permission "{@StaffChatPermission}":
                                    # MODIFY THE NEXT LINE TO CHANGE CHAT FORMAT
                                    send "{@StaffChatPrefix}&r %player%:&b %coloured arg-1%" to loop-player
                                else:
                                    send "{@ErrorMessage}"

    on chat:
        if {staffchat.%player%} is set:
            cancel event
            loop all players:
                if loop-player has permission "{@StaffChatPermission}":
                    # MODIFY THE NEXT LINE TO CHANGE CHAT FORMAT
                    send "{@StaffChatPrefix}&r %player%:&b %coloured message%" to loop-player