variables: {server-chat_last-operation} = "&7Brak" {chat-mode} = "&aWlaczony" {server-write-mode} = false {server-mode-clear} = false {server-mode-on} = false {server-mode-off} = false {server-mode-vip} = false options: error: &8[&c✘&8] success: &8[&a✔&8] command /vip []: permission: chat.vip permission message: &8[&c✘&8] &7Nie masz permisji (chat.vip) trigger: if arg-1 is not set: send "{@error} &7Podaj wiadomosc" stop else: loop all players: if loop-player have permission "chat.vip": send "&6[&ePREMIUM&6] &e%player% &6» &e%arg-1%" to loop-player stop command /achat []: permission: achat.admin permission message: &8[&c✘&8] &7Nie masz permisji (achat.admin) trigger: if {server-write-mode::%player%} is false: open chest with 1 rows named "&8» &7Zarzadzanie chatem" to player wait 1 ticks set slot 0 of current inventory of player to 1 book named "&8» &7Wyczysc chat" set slot 1 of current inventory of player to 1 book named "&8» &7Wlacz chat" set slot 2 of current inventory of player to 1 book named "&8» &7Wylacz chat" set slot 3 of current inventory of player to 1 book named "&8» &7Wlacz chat tylko dla VIP" set slot 7 of current inventory of player to 1 paper named "&8» &7Ostatnia operacja&8: %{server-chat_last-operation}%" set slot 8 of current inventory of player to 1 paper named "&8» &7Stan chatu&8: %{chat-mode}%" stop else: send "{@error} &7Jestes podczas innej operacji chatu" stop on chat: if {server-mode-clear} is true: if {server-write-mode::%player%} is true: set {server-chat_last-operation} to "&7Wyczyszczenie chatu ~ %player%" set {server-chat-operation_reason} to "%message%" loop 100 times: send " " to all players send "&8[&c»&8] &cAdministrator %player% wyczyscil chat, powod: %{server-chat-operation_reason}%" set {server-write-mode::%player%} to false set {server-mode-clear} to false if {server-mode-on} is true: if {server-write-mode::%player%} is true: set {server-chat_last-operation} to "&7Wlaczenie chatu ~ %player%" set {server-chat-operation_reason} to "%message%" send "&8[&c»&8] &cAdministrator %player% wlaczyl chat, powod: %{server-chat-operation_reason}%" set {chat-mode} to "&aWlaczony" set {server-write-mode::%player%} to false set {server-mode-on} to false if {server-mode-off} is true: if {server-write-mode::%player%} is true: set {server-chat_last-operation} to "&7Wylaczenie chatu ~ %player%" set {server-chat-operation_reason} to "%message%" send "&8[&c»&8] &cAdministrator %player% wylaczyl chat, powod: %{server-chat-operation_reason}%" set {chat-mode} to "&cWylaczony" set {server-write-mode::%player%} to false set {server-mode-off} to false if {server-mode-vip} is true: if {server-write-mode::%player%} is true: set {server-chat_last-operation} to "&7Wlaczenie chatu tylko dla vip ~ %player%" set {server-chat-operation_reason} to "%message%" send "&8[&c»&8] &cAdministrator %player% wlaczyl chat tylko dla vip, powod: %{server-chat-operation_reason}%" set {chat-mode} to "&6VIP" set {server-write-mode::%player%} to false set {server-mode-vip} to false on inventory click: if inventory name of current inventory of player contains "&8» &7Zarzadzanie chatem": if clicked slot is 0: cancel event close the player's inventory set {server-write-mode::%player%} to true set {server-mode-clear} to true send "{@success} &7Wpisz na chacie powod wyczyszczenia chatu" stop if clicked slot is 1: if {chat-mode} is "&cWylaczony": cancel event close the player's inventory set {server-write-mode::%player%} to true set {server-mode-on} to true send "{@success} &7Wpisz na chacie powod wlaczenia chatu" stop else: send "{@error} &7Chat juz jest wlaczony" stop if clicked slot is 2: if {chat-mode} is "&aWlaczony": cancel event close the player's inventory set {server-write-mode::%player%} to true set {server-mode-off} to true send "{@success} &7Wpisz na chacie powod wylaczenia chatu" stop else: send "{@error} &7Chatu juz jest wylaczony" stop if clicked slot is 3: if {chat-mode} is "&6VIP": cancel event close the player's inventory set {server-write-mode::%player%} to true set {server-mode-vip} to true send "{@success} &7Wpisz na chacie powod wlaczenia chatu dla vip" stop else: send "{@error} &7Chat juz jest wlaczony dla vip" stop on chat: if {chat-mode} is "&cWylaczony": if player doesn't have permission "chat.write": cancel event send "&8[&c»&8] &cChat jest wylaczony, powod: %{server-chat-operation_reason}%" stop if {chat-mode} is "&6VIP": if player doesn't have permission "chat.writevip": cancel event send "&8[&c»&8] &cChat jest wlaczony tylko dla vip, powod: %{server-chat-operation_reason}%" stop