on load: if folder "plugins/MrChatControl" doesn't exists: create folder "plugins/MrChatControl" if file "plugins/MrChatControl/Messages.yml" doesn't exists: create file "plugins/MrChatControl/Messages.yml" set yaml value "ChatClearMessage" from file "plugins/MrChatControl/Messages.yml" to "&a&lChat zostal wyczyszczony!" set yaml value "ChatClearOn" from file "plugins/MrChatControl/Messages.yml" to "&a&lChat zostal wlaczony!" set yaml value "ChatClearOff" from file "plugins/MrChatControl/Messages.yml" to "&a&lChat zostal wylaczony!" set yaml value "ChatOffline" from file "plugins/MrChatControl/Messages.yml" to "&8>>> &aChat jest wylaczony!" set {ChatClearMessage} to yaml value "ChatClearMessage" from file "plugins/MrChatControl/Messages.yml" set {ChatClearOn} to yaml value "ChatClearOn" from file "plugins/MrChatControl/Messages.yml" set {ChatClearOnError} to yaml value "ChatClearOnError" from file "plugins/MrChatControl/Messages.yml" set {ChatOffline} to yaml value "ChatOffline" from file "plugins/MrChatControl/Messages.yml" variables: {chat.status} = true command /MrChatControl []: aliases: mrcc trigger: if arg isn't set: open chest with 1 rows named "&a&lMrChatControl" to player format slot 3 of player with 1 of orange wool named "&a&lChat Clear" to close then run [make player execute "mrcc clear"] format slot 4 of player with 1 of white wool named "&a&lChat On" to close then run [make player execute "mrcc on"] format slot 5 of player with 1 of black wool named "&a&lChat Off" to close then run [make player execute "mrcc off"] if arg is "clear": loop 100 times: send "" to players send "%{ChatClearMessage}%" to players if arg is "on": if {chat.status} is false: set {chat.status} to true send "%{ChatClearOn}%" to players if arg is "off": if {chat.status} is true: set {chat.status} to false send "%{ChatClearOff}%" to players every 300 seconds: loop 100 times: send "" to players send "%{ChatClearMessage}%" to players on chat: if {chat.status} is false: send "%{ChatOffline}%" stop