#can someone help me add permisons

1 messages · Page 1 of 1 (latest)

rough spade
#
command /chatcolour:
    aliases: /chatcolor
    trigger:
        create a gui with virtual chest inventory with 3 rows named "Chat Colour Selector"
        edit last created gui:

            make gui 10 with red wool named "&cRed":
                set {chatcolour.%player%} to "&c"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &cRed&7!" to player
                close the player's inventory

            make gui 11 with orange wool named "&6Orange":
                set {chatcolour.%player%} to "&6"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &6Orange&7!" to player
                close the player's inventory
#
                set {chatcolour.%player%} to "&e"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &eYellow&7!" to player
                close the player's inventory

            make gui 13 with lime wool named "&aLime":
                set {chatcolour.%player%} to "&a"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &aLime&7!" to player
                close the player's inventory

            make gui 14 with light blue wool named "&bAqua":
                set {chatcolour.%player%} to "&b"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &bAqua&7!" to player
                close the player's inventory

            make gui 15 with blue wool named "&9Blue":
                set {chatcolour.%player%} to "&9"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &9Blue&7!" to player
                close the player's inventory

            make gui 16 with purple wool named "&5Purple":
                set {chatcolour.%player%} to "&5"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &5Purple&7!" to player
                close the player's inventory

            make gui 22 with gray wool named "&7Reset Colour":
                delete {chatcolour.%player%}
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour has been reset!" to player
                close the player's inventory

        open last created gui to player

on chat:
    if {chatcolour.%player%} is set:
        set message to "%{chatcolour.%player%}%%message%"```
vague thorn
#

If you need the command to require a permission, you can use the permission option for it (permission: test.example). Otherwise, you can use the expression: if player has permission "test.example":

rough spade
#
make gui 10 with red wool named "&cRed":
                if player has permission "chatcolour.red":
                set {chatcolour.%player%} to "&c"
                send "<#00FFFD>&lU<#4CF2F0>&lN<#5EF2F0>&lB<#70F1EF>&lO<#4CF2F0>&lX<#00FFFD>&lD&8 » &7Your chat colour is now &cRed&7!" to player
                close the player's inventory```
#

like this

vague thorn
rough spade
#

i get this tho

#

also i just discorverd using that even when i have red selected its still white in chat

#

it only works while im op