# permissions # channel.staff --> give this permission to your staff members so the can kick / mute players. let you be able to see all channels # channel.ban --> this prevents a player from making a private channel # channel.delete --> this gives the staff member the ability to delete a private channel that is not his/hers # channel.nopassword --> this give the staff member the ability to join a private channel without the password options: normalchat: 4 # put here the amount of normal channels you want to use privedchat: 4 # put here the amount of private channels you want to use abusivecleaner: true # set to false if you dont want to check the chat for abusive words on load: loop integers from 1 to {@normalchat}: if {channel.%loop-num%::*} is not set: set {channel.%loop-num%::*} to "" if {channels.names::*} is not set: set {channels.names::*} to "" loop {@normalchat} times: add "%loop-num%" to {channels.names::*} loop {@privedchat} times: if {channel.privatechannel.%loop-num%} is not set: set {channel.privatechannel.%loop-num%} to "free" loop all players: add "%uuid of loop-player%" to {channel.1::*} set loop-player tab name to "&7[&bCh1&7]&f%loop-player%" if {abusive.words::*} is not set: if {@abusivecleaner} is true: set {abusive.words::*} to "hacker" {first.use} is not set broadcast "&b-------------------&7Chat Channel&b--------------------" broadcast "&aThank you for trying out &7Chat Channel" broadcast "&aI hope you are happy to use it" broadcast "&ado you have any nice idea's for the" broadcast "&aNext update? please tell me and i will look at it!" broadcast "&aGreats, &7pajokiller" broadcast "&b--------------------------------------------------" set {first.use} to true set {chatchannel.bannedchannelnames::*} to "hacker" on unload: loop {@normalchat} times: delete {channel.%loop-num%::*} loop {@privedchat} times: delete {channel.%{channel.privatechannel.%loop-num%}%::*} delete {channel.privatechannel.%loop-num%} delete {channel.privatechannel.owner.%loop-num%} delete {channel.privatechannel.password.%loop-num%} delete {channels.names::*} loop all players: set loop-player tab name to "%loop-player%" delete {abusive.words::*} on join: Add "%uuid of player%" to {channel.1::*} set player tab name to "&7[&bCh1&7]&f%player%" on quit: loop {@normalchat} times: if "%{channel.%loop-num%::*}%" contains "%uuid of player%": remove "%uuid of player%" from {channel.%loop-num%::*} loop {@privedchat} times: if "%{channel.%{channel.privatechannel.%loop-num%}%::*}%" contains "%uuid of player%": remove "%uuid of player%" from {channel.%{channel.privatechannel.%loop-num%}%::*} loop {@privedchat} times: if {channel.privatechannel.owner.%loop-num%} is "%player%": delete {channel.privatechannel.owner.%loop-num%} remove "%{channel.privatechannel.%loop-num%}%" from {channels.names::*} loop all players: if "%{channel.%{channel.privatechannel.%loop-num%}%::*}%" contains "%uuid of loop-player%": remove "%uuid of loop-player%" from {channel.%{channel.privatechannel.%loop-num%}%::*} send "&aThe Owner of the private channel leaved the game." to loop-player send "&bYou are switched to &7Channel 1" to loop-player add "%uuid of loop-player%" to {channel.1::*} delete {channel.%{channel.privatechannel.%loop-num%}%::*} set {channel.privatechannel.%loop-num%} to "free" set player tab name to "&f%player%" command /ch [] [] []: trigger: if arg 1 is set: if arg 1 is "join": if arg 2 is set: if "%{channel.%arg 2%::*}%" contains "%uuid of player%": send "&b-------------------&7Chat Channel&b--------------------" send "&aYou are already in channel %arg 2%" else: set {_channel.uuid.%player%} to "%uuid of player%" set {_channel.%player%} to "%player%" if "%{channels.names::*}%" contains "%arg 2%": loop {@privedchat} times: if "%arg 2%" is "%{channel.privatechannel.%loop-num%}%": set {_not.prived.%player%} to true if {_not.prived.%player%} is not set: set {_channelchecker.%player%} to 1 loop {@normalchat} times: loop all players: if "%{channel.%{_channelchecker.%player%}%::*}%" contains "%uuid of player%": remove "%{_channel.uuid.%player%}%" from {channel.%{_channelchecker.%player%}%::*} if "%{channel.%{_channelchecker.%player%}%::*}%" contains "%uuid of loop-player%": send "&a%{_channel.%player%}% switched to channel: %arg 2%" to loop-player add 1 to {_channelchecker.%player%} delete {channelchecker.%player%} set {_private.channel.checker.%player%} to 1 loop {@privedchat} times: loop all players: if "%{channel.%{channel.privatechannel.%{_private.channel.checker.%player%}%}%::*}%" contains "%uuid of player%": remove "%{_channel.uuid.%player%}%" from {channel.%{channel.privatechannel.%{_private.channel.checker.%player%}%}%::*} if "%{channel.%{channel.privatechannel.%{_private.channel.checker.%player%}%}%::*}%" contains "%uuid of loop-player%": send "&a%{_channel.%player%}% switched to channel: %arg 2%" to loop-player add 1 to {_private.channel.checker.%player%} add "%{_channel.uuid.%player%}%" to {channel.%arg 2%::*} set player tab name to "&7[&bCh%arg 2%&7]&f%player%" loop all players: if "%{channel.%arg 2%::*}%" contains "%uuid of loop-player%": if "%uuid of loop-player%" is not "%{_channel.uuid.%player%}%": send "&a%{_channel.%player%}% joined your channel" to loop-player send "&aYou are switched to channel %arg 2%" else: if arg 2 is "free": send "&b-------------------&7Chat Channel&b--------------------" send "&aThis isn't a valid channel! use the command" send "&7/ch &ato see wich channels there are" else: set {_private.join.%player%} to 1 loop {@privedchat} times: if arg 2 is "%{channel.privatechannel.%{_private.join.%player%}%}%": if player has permission "channel.nopassword": set {_private.chat.join.%player%} to true if arg 3 is "%{channel.privatechannel.password.%{_private.join.%player%}%}%": set {_private.chat.join.%player%} to true if {_private.chat.join.%player%} is true: if "%{channel.%{channel.privatechannel.%{_private.join.%player%}%}%::*}%" contains "%uuid of player%": send "&b-------------------&7Chat Channel&b--------------------" send "&ayou are already in channel %arg 2%" else: add "%uuid of player%" to {channel.%{channel.privatechannel.%{_private.join.%player%}%}%::*} set player tab name to "&7[&bCh %{channel.privatechannel.%{_private.join.%player%}%}%&7]&f%player%" loop all players: if "%{channel.%{channel.privatechannel.%{_private.join.%player%}%}%::*}%" contains "%uuid of loop-player%": if "%uuid of loop-player%" is not "%{_channel.uuid.%player%}%": send "&a%{_channel.%player%}% has joined this private channel" to loop-player send "&b-------------------&7Chat Channel&b--------------------" send "&aYou are switched to channel %arg 2%" set {_antispam.join.%player%} to true set {_channelchecker.%player%} to 1 loop {@normalchat} times: loop all players: if "%{channel.%{_channelchecker.%player%}%::*}%" contains "%uuid of player%": remove "%{_channel.uuid.%player%}%" from {channel.%{_channelchecker.%player%}%::*} if "%{channel.%{_channelchecker.%player%}%::*}%" contains "%uuid of loop-player%": send "&a%{_channel.%player%}% switched to channel: %arg 2%" to loop-player add 1 to {_channelchecker.%player%} else: send "&b-------------------&7Chat Channel&b--------------------" send "&aThis is the wrong password. If you wanna join the channel ask the" send "&aOwner of this channel for the correct password." add 1 to {_private.join.%player%} else: send "&b-------------------&7Chat Channel&b--------------------" send "&aThis isn't a valid channel! use the command" send "&7/ch &ato see wich channels there are" else: send "&b-------------------&7Chat Channel&b--------------------" send "&aThis isn't a valid channel! use the command" send "&7/ch &ato see wich channels there are" if arg 1 is "create": if arg 2 is set: if arg 3 is set: set {_channel.uuid.%player%} to "%uuid of player%" set {_channel.%player%} to "%player%" if "%{channel.ban::*}%" contains "%player%": send "&b-------------------&7Chat Channel&b--------------------" send "&aYou are not allowed to make a channel!" send "&aDo you wanna know why? Ask a Staff!" else: loop {@privedchat} times: if "%arg 3%" is "%loop-num%": send "&aYou are not allowed to use that channelname!" set {_channel.bannedname.use} to true {_prived.create.%player%} is not set if {channel.privatechannel.%loop-num%} is "free": set {_prived.create.%player%} to true set {_prived.create.correct.%player%} to "%loop-num%" if "%{chatchannel.bannedchannelnames::*}%" contains "%arg 3%": send "&aYou are not allowed to use that channelname!" set {_channel.bannedname.use} to true {_channel.bannedname.use} is not set if {_prived.create.%player%} is true: set {_owner.checker.%player%} to 1 loop {@privedchat} times: if {channel.privatechannel.owner.%{_owner.checker.%player%}%} is "%player%": {_owner.checker.create.%player%} is not set send "&b-------------------&7Chat Channel&b--------------------" send "&aYou already have a private channel!" set {_owner.checker.create.%player%} to true else: add 1 to {_owner.checker.%player%} if {_owner.checker.create.%player%} is not set: {_channel.create.antispam.%player%} is not set set {channel.privatechannel.%{_prived.create.correct.%player%}%} to "%arg 2%" set {channel.privatechannel.password.%{_prived.create.correct.%player%}%} to "%arg 3%" set {channel.privatechannel.owner.%{_prived.create.correct.%player%}%} to "%player%" add "%arg 2%" to {channels.names::*} add "%uuid of player%" to {channel.%{channel.privatechannel.%{_prived.create.correct.%player%}%}%::*} set player tab name to "&7[&bCh %arg 2%&7]&f%player%" send "&b-------------------&7Chat Channel&b--------------------" send "&bYou made a private channel named &7%arg 2% &bwith the password &7%arg 3%" set {_channelchecker.%player%} to 1 loop {@normalchat} times: loop all players: if "%{channel.%{_channelchecker.%player%}%::*}%" contains "%uuid of player%": remove "%uuid of player%" from {channel.%{_channelchecker.%player%}%::*} if "%{channel.%{_channelchecker.%player%}%::*}%" contains "%uuid of loop-player%": send "&a%{_channel.%player%}% switched to channel: %arg 2%" to loop-player add 1 to {_channelchecker.%player%} set {_channel.create.antispam.%player%} to true set {_owner.checker.create.%player%} to true else: send "&b-------------------&7Chat Channel&b--------------------" send "&aSorry all the private channels are in use" else: send "&b-------------------&7Chat Channel&b--------------------" send "&aIncorrect usage. Use&7: /ch create " else: send "&b-------------------&7Chat Channel&b--------------------" send "&aIncorrect usage. Use&7: /ch create " if arg 1 is "delete": if arg 2 is set: set {_channel.delete.%player%} to 1 loop {@privedchat} times: if player has permission "channel.delete": set {_channel.delete.correct.%player%} to true else if "%{channel.privatechannel.owner.%{_channel.delete.%player%}%}%" contains "%player%": set {_channel.delete.correct.%player%} to true if {_channel.delete.correct.%player%} is true: if arg 2 is "%{channel.privatechannel.%{_channel.delete.%player%}%}%": send "&b-------------------&7Chat Channel&b--------------------" send "&aYou deleted channel&7: %arg 2%" loop all players: if "%loop-player%" contains "%{channel.privatechannel.owner.%{_channel.delete.%player%}%}%": set loop-player tab name to "&7[&bCh1&7]&f%loop-player%" delete {channel.privatechannel.owner.%{_channel.delete.%player%}%} remove "%{channel.privatechannel.%{_channel.delete.%player%}%}%" from {channels.names::*} loop all players: if "%{channel.%{channel.privatechannel.%{_channel.delete.%player%}%}%::*}%" contains "%uuid of loop-player%": remove "%uuid of loop-player%" from {channel.%{channel.privatechannel.%{_channel.delete.%player%}%}%::*} send "&7%player% &adeleted this private channel" to loop-player send "&bYou are switched to &7Channel 1" to loop-player add "%uuid of loop-player%" to {channel.1::*} delete {channel.%{channel.privatechannel.%{_channel.delete.%player%}%}%::*} delete {channel.privatechannel.password.%{_channel.delete.%player%}%} set {channel.privatechannel.%{_channel.delete.%player%}%} to "free" set {_sended.%player%} to true add 1 to {_channel.delete.%player%} {_sended.%player%} is not set send "&b-------------------&7Chat Channel&b--------------------" send "&aThis is not the correct name of your channel" else: send "&b-------------------&7Chat Channel&b--------------------" send "&aYou didn't gave the channel name that you want to delete" if arg 1 is "kick": if arg 2 is set: set {_channel.kicknaam.%player%} to "%arg 2%" parsed as offline player if player has permission "channel.staff": if "%{channel.1::*}%" contains "%uuid of {_channel.kicknaam.%player%}%": send "&b-------------------&7Chat Channel&b--------------------" send "&aYou can't kick somebody from channel 1" to player send "&aIf this person spams or swears in the chat use the command &7/ch mute" to player else: set {_channel.kick.%player%} to 2 loop integers from 2 to {@normalchat}: if "%{channel.%{_channel.kick.%player%}%::*}%" contains "%uuid of {_channel.kicknaam.%player%}%": remove "%uuid of {_channel.kicknaam.%player%}%" from {channel.%{_channel.kick.%player%}%::*} send "&aYou have been kicked by&7: %player% &afrom channel&7: %{_channel.kick.%player%}%" to {_channel.kicknaam.%player%} send "&aYou are now in channel 1" to {_channel.kicknaam.%player%} loop all players: if "%{_channel.kicknaam.%player%}%" contains "%loop-player%": set loop-player tab name to "&7[&bCh1&7]&f%loop-player%" if "%{channel.%{_channel.kick.%player%}%::*}%" contains "%uuid of loop-player%": send "&a%{_channel.kicknaam.%player%}% is kicked out of this channel" to loop-player if "%{channel.1::*}%" contains "%uuid of loop-player%": send "&a%{_channel.kicknaam.%player%}% joined your channel" to loop-player add "%uuid of {_channel.kicknaam.%player%}%" to {channel.1::*} add 1 to {_channel.kick.%player%} set {_privatechannel.kick.%player%} to 1 loop {@privedchat} times: if "%{channel.%{channel.privatechannel.%{_privatechannel.kick.%player%}%}%::*}%" contains "%uuid of {_channel.kicknaam.%player%}%": remove "%uuid of {_channel.kicknaam.%player%}%" from {channel.%{channel.privatechannel.%{_privatechannel.kick.%player%}%}%::*} send "&aYou have been kicked by&7: %player% &afrom channel&7: %{channel.privatechannel.%{_privatechannel.kick.%player%}%}%" to {_channel.kicknaam.%player%} send "&aYou are now in channel 1" to {_channel.kicknaam.%player%} loop all players: if "%{_channel.kicknaam.%player%}%" contains "%loop-player%": set loop-player tab name to "&7[&bCh1&7]&f%loop-player%" if "%{channel.%{channel.privatechannel.%{_privatechannel.kick.%player%}%}%::*}%" contains "%uuid of loop-player%": send "&a%{_channel.kicknaam.%player%}% is kicked out of this channel" to loop-player if "%{channel.1::*}%" contains "%uuid of loop-player%": send "&a%{_channel.kicknaam.%player%}% joined your channel" to loop-player add "%uuid of {_channel.kicknaam.%player%}%" to {channel.1::*} add 1 to {_privatechannel.kick.%player%} loop {@privedchat} times: if "%{channel.privatechannel.owner.%loop-num%}%" contains "%player%": set {_kick.correct.%player%} to true {_kick.correct.%player%} is true if "%{channel.%{channel.privatechannel.%loop-num%}%::*}%" contains "%uuid of {_channel.kicknaam.%player%}%": remove "%uuid of {_channel.kicknaam.%player%}%" from {channel.%{channel.privatechannel.%loop-num%}%::*} send "&aYou have been kicked from the channel by&7: %player%" to {_channel.kicknaam.%player%} send "&aYou are now in &7channel 1" to {_channel.kicknaam.%player%} send "&aYou have kicked %{_channel.kicknaam.%player%}% from your channel" to player loop all players: if "%{channel.%{channel.privatechannel.%loop-num%}%::*}%" contains "%uuid of loop-player%": send "&7%{_channel.kicknaam.%player%}%&a is kicked out of the channel" to loop-player if "%{channel.1::*}%" contains "%uuid of loop-player%": send "&7%{_channel.kicknaam.%player%}% joined your channel" to loop-player add "%uuid of {_channel.kicknaam.%player%}%" to {channel.1::*} set player tab name to "&7[&bCh1&7]&f%player%" else: send "&b-------------------&7Chat Channel&b--------------------" send "&aYou didn't gave the player name that you want to delete" if arg 1 is "names": if player has permission "channel.staff": if arg 2 is "ban": arg 3 is set if "%{chatchannel.bannedchannelnames::*}%" contains "%arg 3%": send "&aThis name is allready in the banned names list" else: send "&aYou add the %arg 3% to the banned names list" add "%arg 3%" to {chatchannel.bannedchannelnames::*} if arg 2 is "unban": arg 3 is set: if "%{chatchannel.bannedchannelnames::*}%" contains "%arg 3%": remove "%arg 3%" from {chatchannel.bannedchannelnames::*} send "&aYou removed %arg 3% from the banned channel names list" else: send "&aThis name isn't a banned channel name" else: send "&aYou dont have the permission to use this command" if arg 1 is "staff": if player has permission "channel.staff": if "%{chat.staff::*}%" contains "%uuid of player%": remove "%uuid of player%" from {chat.staff::*} send "&aYou can now only see the messages from your current channel!" else: add "%uuid of player%" to {chat.staff::*} send "&aYou can now see all the messages from all the channels!" else: send "&aYou don't have the permissions to use this command!" if arg 1 is "word": if player has permission "channel.staff": if {@abusivecleaner} is true: if arg 2 is "add": if "%{abusive.words::*}%" contains "%arg 3%": send "&aThe word &7%arg 3% &ais allready add to the list" else: add "%arg 3%" to {abusive.words::*} send "&ayou add the word &7%arg 3% &ato the abusive words list" if arg 2 is "remove": if "%{abusive.words::*}%" contains "%arg 3%": remove "%arg 3%" from {abusive.words::*} send "&ayou removed the word &7%arg 3% &afrom the abusive words list" else: send "&aThe list does not contain the word &7%arg 3%" if arg 2 is "list": send "&aThis are the words that will be considered to be abusive&7:" send "&7%{abusive.words::*}%" if arg 2 is "used": arg 3 is set if "%{abusive.players.used::*}%" contains "%arg 3%": #nothing else: add "%uuid of arg 3%" to {abusive.players.used::*} if {abusive.%uuid of arg 3%.used} is set: send "&athe player &7%arg 3% &aused &7%{abusive.%uuid of arg 3%.used}% &atimes abusive words" else: send "This player never used abusive words, or has never joined the server" if arg 2 is "clear": if arg 3 is set: if arg 3 is "all": loop {abusive.players.used::*}: delete {abusive.%{abusive.players.used::%loop-value%}%.used} send "&aYou deleted the whole database of how many times people used abusive words" else: loop {abusive.players.used::*}: if "%{abusive.players.used::*}%" contains "%uuid of arg 3%": send "&aYou deleted the amount of time %arg 3% used abusive words" else: send "&aThis player never used abusive words" else: send "&aWrong usage. use&7: /ch word clear " else: send "&aSorry, you disabled this feathure is disabled" else: send "&aYou don't have the permissions to use this command!" if arg 1 is "help": arg 2 is not set: send "&b----&7Help:&b----&7Chat Channel&b---&7Page 1&b/&73&b----" send "&a/Ch&7: Let you show which channels there are" send "&a/Ch join&7: Let you join a channel" send "&a/Ch create&7: Make you create a private channel" send "&a/Ch delete&7: Delete a private channel" send "&a/Ch kick&7: Kicks someone from your private channel" send "&bType &7/Ch help 2&b to read the next page" else: if arg 2 is "2": send "&b----&7Help:&b----&7Chat Channel&b---&7Page 2&b/&73&b----" send "&a/Ch mute&7: Mute a player" send "&a/Ch version&7: The current version you are running" send "&a/Ch ban&7: Prevents a player from making a private channel" send "&a/Ch unban&7: Let a player be able to make a private channel again" send "&a/Ch staff&7: Let you enable or disable to see messages from other channels" send "&bType &7/Ch help 3&b to read the next page" if arg 2 is "3": send "&b----&7Help:&b----&7Chat Channel&b---&7Page 3&b/&73&b----" send "&a/ch names&7: with this command you can ban/unban channel names for private channels" if {@abusivecleaner} is true: send "&a/ch word&7: with this command you can add, remove words to a list wich arn't allowed to be said in the chat" send "&a/ch word list&7: with this command you can see the words that arn't allowed in the chat" send "&a/ch word used&7: with this command staff can look how many times a player used abusive words" if arg 1 is "ban": if arg 2 is set: set {_channel.ban.%player%} to "%arg 2%" parsed as offline player if player has permission "channel.staff": if "%{channel.ban::*}%" contains "%{_channel.ban.%player%}%": send "&b-------------------&7Chat Channel&b--------------------" send "&%{_channel.ban.%player%}% &acan't make a private channel allready" else: add "%{_channel.ban.%player%}%" to {channel.ban::*} send "&b-------------------&7Chat Channel&b--------------------" send "&7%{_channel.ban.%player%}% &acan't make a private channel from now" else: send "&b-------------------&7Chat Channel&b--------------------" send "&aYou didn't gave the player name" if arg 1 is "unban": if arg 2 is set: set {_channel.unban.%player%} to "%arg 2%" parsed as offline player if player has permission "channel.staff": if "%{channel.ban::*}%" contains "%{_channel.unban.%player%}%": remove "%{_channel.unban.%player%}%" from {channel.ban::*} send "&b-------------------&7Chat Channel&b--------------------" send "&7%{_channel.unban.%player%}% &acan now make a private channel again" else: send "&b-------------------&7Chat Channel&b--------------------" send "&7%{_channel.unban.%player%}% &aisn't banned from making a private channel" else: send "&b-------------------&7Chat Channel&b--------------------" send "&aYou didn't gave the player name" if arg 1 is "mute": if arg 2 is set: set {_channel.mute.%player%} to "%arg 2%" parsed as offline player if player has permission "channel.staff": if "%{channel.muted::*}%" contains "%player%": remove "%player%" from {channel.muted::*} send "&b-------------------&7Chat Channel&b--------------------" to player send "&aYou unmuted %{_channel.mute.%player%}%" to player send "&b-------------------&7Chat Channel&b--------------------" to {_channel.mute.%player%} send "&aYou are unmuted by&7: %player%" to {_channel.mute.%player%} else: add "%player%" to {channel.muted::*} send "&b-------------------&7Chat Channel&b--------------------" to player send "&aYou muted %{_channel.mute.%player%}%" to player send "&b-------------------&7Chat Channel&b--------------------" to {_channel.mute.%player%} send "&aYou are muted by&7: %player%.&a Don't you know why? ask a staff member why and for how long using the command&7: /msg" to {_channel.mute.%player%} else: send "&b-------------------&7Chat Channel&b--------------------" to player send "&aYou don't have the permission to use this command!" to player else: send "&b-------------------&7Chat Channel&b--------------------" to player send "&aThis isn't a minecraft name. Please use a correct name to mute the player" to player if arg 1 is "version": send "&b-------------------&7Chat Channel&b--------------------" send "&aThis plugin is made by: &7Pajokiller" send "&aYou are currently using version: &71.4.1" else: set {_channel.wich.%player%} to 1 loop {@normalchat} times: if "%{channel.%{_channel.wich.%player%}%::*}%" contains "%uuid of player%": send "&b-------------------&7Chat Channel&b--------------------" send "&aYou are at the moment in channel: &7Channel %{_channel.wich.%player%}%" else if "%{channel.%{channel.privatechannel.%{_channel.wich.%player%}%}%::*}%" contains "%uuid of player%": send "&b-------------------&7Chat Channel&b--------------------" send "&aYou are at the moment in channel: &7Channel %{channel.privatechannel.%{_channel.wich.%player%}%}%" add 1 to {_channel.wich.%player%} send "&aThere are {@normalchat} regular channels you can always join" send "&aThese are the private channels that are in use:" loop {@privedchat} times: send "&7%{channel.privatechannel.%loop-num%}%" send "&aAny questions? Use the command &7/Ch help &afor help" send "&b--------------------------------------------------" on chat: cancel event if "%{channel.muted::*}%" contains "%player%": send "&b-------------------&7Chat Channel&b--------------------" send "&aSorry, but you are muted. don't you know why? Ask a staff using &7/msg &awhy." else: if {@abusivecleaner} is true: set {_message.%sender%} to "%message%" loop {abusive.words::*}: if "%{_message.%sender%}%" contains "%{abusive.words::%loop-index%}%": replace all "%{abusive.words::%loop-index%}%" with "***" in {_message.%sender%} if {abusive.%sender%.used} is not set: set {abusive.%sender%.used} to 1 else: add 1 to {abusive.%sender%.used} {_anti.abusive.spam.%sender%} is not set set {_anti.abusive.spam.%sender%} to "true" send "&cPlease dont use those words!" to sender set {_chat.channel.%sender%} to 1 loop {@normalchat} times: if "%{channel.%{_chat.channel.%sender%}%::*}%" contains "%uuid of sender%": loop all players: if "%{channel.%{_chat.channel.%sender%}%::*}%" contains "%uuid of loop-player%": send "[&bCh%{_chat.channel.%sender%}%&f]%display name of sender%> %{_message.%sender%}%" to loop-player else if loop-player has permission "channel.staff": if "%{chat.staff::*}%" contains "%uuid of loop-player%": send "[&bCh %{_chat.channel.%sender%}%&f]%display name of sender%> %{_message.%sender%}%" to loop-player add 1 to {_chat.channel.%sender%} set {_chat.private.channel.%sender%} to 1 loop {@privedchat} times: if "%{channel.%{channel.privatechannel.%{_chat.private.channel.%sender%}%}%::*}%" contains "%uuid of sender%": loop all players: if "%{channel.%{channel.privatechannel.%{_chat.private.channel.%sender%}%}%::*}%" contains "%uuid of loop-player%": send "[&bCh %{channel.privatechannel.%{_chat.private.channel.%sender%}%}%&f]%display name of sender%> %{_message.%sender%}%" to loop-player else if loop-player has permission "channel.staff": if "%{chat.staff::*}%" contains "%uuid of loop-player%": send "[&bCh %{channel.privatechannel.%{_chat.private.channel.%sender%}%}%&f]%display name of sender%> %{_message.%sender%}%" to loop-player add 1 to {_chat.private.channel.%sender%}