Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Created by MisterBasic, only by MisterBasic!
- options:
- enabled: true
- custom_chat: false
- version: 1.4 # Release
- blocked_domains: ".com" or ".tk" or ".net" or ".org" or ".onion" or ".serv.nu" or ".gs" or ".server" or ".pro" or ".aternos" or ".me" or ".minehut" or ".int" or ".edu" or ".abc" or ".bot" or ".buy" or ".dev" # Add more if you wish. These are just the main ones
- on chat:
- if {PLUGIN::enabled} is true:
- if message contains {@blocked_domains}:
- player does not have permission "antiswear.bypass" or "antiswear.admin"
- cancel event
- send "%{antiswear::prefix}%%{MESSAGES::no-advert}%"
- set {_messager} to the player
- loop all players:
- loop-player has permission "antiswear.notify" or "antiswear.admin"
- send "%{antiswear::prefix}%&6Advertisement Detected by %{_messager}%: %message%" to loop-player
- stop
- if message contains {antiswear::blockedwords::*}:
- player does not have permission "antiswear.bypass" or "antiswear.admin"
- replace every {antiswear::blockedwords::*} in message with "%{MESSAGES::censor}%"
- send "%{antiswear::prefix}%%{MESSAGES::no-cussing}%"
- set {_messager} to the player
- loop all players:
- loop-player has permission "antiswear.notify" or "antiswear.admin"
- send "%{antiswear::prefix}%&6Swear Detected by %{_messager}%: %message%" to loop-player
- stop
- if {antiswear::chatdisabled} is true:
- cancel event
- send "%{MESSAGES::chat-disabled}%" to player
- if {chatmode.%player%} is "staffchat":
- cancel event
- loop all players:
- send "%{MESSAGES::staffchat-prefix}% %message%" to loop-player
- if {@custom_chat} is true:
- cancel event
- if {prefix.%player%} is not set:
- set {prefix.%player%} to ""
- if {suffix.%player%} is not set:
- set {suffix.%player%} to ""
- broadcast "%{prefix.%player%}%%player%%{suffix.%player%}%&r: %message%"
- if {prefix.%player%} is "":
- clear {prefix.%player%}
- if {suffix.%player%} is "":
- clear {suffix.%player%}
- on join:
- if {prefix.%player%} is not set:
- set {prefix.%player%} to ""
- if {suffix.%player%} is not set:
- set {suffix.%player%} to ""
- set player's display name to "%{prefix.%player%}%%player%%{suffix.%player%}%"
- set player's tablist name to "%{prefix.%player%}%%player%%{suffix.%player%}%"
- if {prefix.%player%} is "":
- clear {prefix.%player%}
- if {suffix.%player%} is "":
- clear {suffix.%player%}
- every 5 seconds:
- loop all players:
- if {prefix.%loop-player%} is not set:
- set {prefix.%loop-player%} to ""
- if {suffix.%loop-player%} is not set:
- set {suffix.%loop-player%} to ""
- set loop-player's display name to "%{prefix.%loop-player%}%%loop-player%%{suffix.%loop-player%}%"
- set loop-player's tablist name to "%{prefix.%loop-player%}%%loop-player%%{suffix.%loop-player%}%"
- if {prefix.%loop-player%} is "":
- clear {prefix.%loop-player%}
- if {suffix.%loop-player%} is "":
- clear {suffix.%loop-player%}
- command /antiswear:antiswear [<text>] [<text>]:
- description: Main command for AntiSwear
- aliases: /as, /atsw, /noswear, /ns, /aswear, /swear, /antiswear
- executable by: console and players
- trigger:
- if {PLUGIN::enabled} is true:
- if sender has permission "antiswear.use" or "antiswear.admin":
- if arg 1 is not set:
- wait 2 ticks
- send "%{antiswear::prefix}%&eCurrent Version: &a%{PLUGIN::version}%&e, should be up to date!"
- send "%{antiswear::prefix}%&eUse ""/antiswear help"" to list all commands!"
- exit
- if arg 1 is set:
- if arg 1 is "help":
- if arg 2 is "1":
- send "&8&m------------- &7 AntiSwear &8&m------------------"
- send "&7/antiswear: Main command"
- send "&7/antiswear version: Get the version"
- send "&7/antiswear reload: Reload the skript / config"
- send "&7/antiswear add [word]: Add a blocked word"
- send "&7/antiswear remove [word]: Remove a blocked word"
- send "&7/antiswear list: List all blocked words"
- send "&7/antiswear broadcast [message]: Broadcast a msg"
- send "&7/antiswear test: Test the skript"
- send "&7/antiswear notify [true|false]: Toggle Notifications"
- send "&8&m----------------------------- &7Page 1&8&m ---"
- exit
- if arg 2 is not set:
- send "&8&m------------- &7 AntiSwear &8&m------------------"
- send "&7/antiswear: Main command"
- send "&7/antiswear version: Get the version"
- send "&7/antiswear reload: Reload the skript / config"
- send "&7/antiswear add [word]: Add a blocked word"
- send "&7/antiswear remove [word]: Remove a blocked word"
- send "&7/antiswear list: List all blocked words"
- send "&7/antiswear broadcast [message]: Broadcast a msg"
- send "&7/antiswear test: Test the skript"
- send "&7/antiswear notify [true|false]: Toggle Notifications"
- send "&8&m----------------------------- &7Page 1&8&m ---"
- exit
- if arg 2 is "2":
- send "&8&m------------- &7 AntiSwear &8&m------------------"
- send "&7/clearchat [reason]: Clear the chat"
- send "&7/togglechat: Toggle the chat"
- send "&7/addons: List addons"
- send "&7/prefix <player> [prefix]: Set a player's prefix"
- send "&7/suffix <player> [suffix]: Set a player's suffix"
- send "&8&m----------------------------- &7Page 2&8&m ---"
- exit
- if arg 2 is not "" or "1" or "2":
- send "&cPage %arg 2% does not exist!"
- if arg 1 is "add":
- wait 2 ticks
- if arg 2 is not set:
- send "%{antiswear::prefix}%&cMissing Arguments: /antiswear add <word>"
- exit
- if arg 2 is set:
- add "%arg 2%" to {antiswear::blockedwords::*}
- send "%{antiswear::prefix}%&aAdded&e %arg 2% to Blocked words!"
- exit
- if arg 1 is "remove":
- wait 2 ticks
- if arg 2 is not set:
- send "%{antiswear::prefix}%&cMissing Arguments: /antiswear remove <word>"
- exit
- if arg 2 is set:
- remove "%arg 2%" from {antiswear::blockedwords::*}
- send "%{antiswear::prefix}%&cRemoved&e %arg 2%&c from Blocked words"
- exit
- if arg 1 is "list":
- if {antiswear::blockedwords::*} is not set:
- set {antiswear::blockedwords::*} to "No words blocked!"
- wait 2 ticks
- send "%{antiswear::prefix}%&9Total Words:%nl%&r%{antiswear::blockedwords::*}%"
- wait a tick
- clear {antiswear::blockedwords::*}
- exit
- if arg 1 is "reload":
- send "%{antiswear::prefix}%&aReloading..."
- wait a ticks
- make console execute "skript reload %script name%"
- send "%{antiswear::prefix}%&aReloaded!"
- exit
- if arg 1 is "broadcast":
- if arg 2 is set:
- wait a ticks
- broadcast "%{antiswear::prefix}%%coloured arg 2%"
- exit
- if arg 1 is "test":
- wait 2 ticks
- send "&8&m-----------------------------"
- send "%{antiswear::prefix}%&a&lVersion: %{PLUGIN::version}% is working!"
- send "&8&m-----------------------------"
- exit
- if arg 1 is "addon":
- wait 2 ticks
- send "%{antiswear::prefix}%Please use /addon"
- exit
- if arg 1 is "notify":
- wait 2 ticks
- if arg 2 is not set:
- if {antiswear::notify.%executor%} is true:
- set {antiswear::notify.%executor%} to false
- send "%{antiswear::prefix}%&eNotifications &cDisabled"
- exit
- else:
- set {antiswear::notify.%executor%} to true
- send "%{antiswear::prefix}%&eNotifications &aEnabled"
- exit
- else:
- if arg 2 is set:
- if arg 2 is "true":
- set {antiswear::notify.%executor%} to true
- send "%{antiswear::prefix}%&eNotifications &aEnabled"
- exit
- else:
- if arg 2 is "false":
- set {antiswear::notify.%executor%} to false
- send "%{antiswear::prefix}%&eNotifications &cDisabled"
- exit
- else:
- send "%{antiswear::prefix}%&cInvaild Input:&e /antiswear notify [true|false]"
- exit
- if arg 1 is "version":
- send "%{antiswear::prefix}%&eCurrent Version:&a %{PLUGIN::version}%"
- exit
- else:
- send "%{antiswear::prefix}%&cYou do not have permission to use this command!"
- exit
- else if {PLUGIN::enabled} is "false":
- send "%{antiswear::prefix}%&cPlugin was Disabled by Administrator."
- exit
- on enable:
- set {MESSAGES::chat-disabled} to yaml value "messages.chat-disabled" from "plugins\AntiSwear\config.yml"
- set {MESSAGES::staffchat-prefix} to yaml value "messages.staffchat-prefix" from "plugins\AntiSwear\config.yml"
- set {MESSAGES::no-advert} to yaml value "messages.deny-advertising" from "plugins\AntiSwear\config.yml"
- set {MESSAGES::no-cussing} to yaml value "messages.deny-cussing" from "plugins\AntiSwear\config.yml"
- set {MESSAGES::censor} to yaml value "messages.censor" from "plugins\AntiSwear\config.yml"
- set {antiswear::prefix} to yaml value "messages.prefix" from "plugins\AntiSwear\config.yml"
- set {PLUGIN::enabled} to yaml value "plugin.enabled" from "plugins\AntiSwear\config.yml"
- set {PLUGIN::version} to yaml value "plugin.version" from "plugins\AntiSwear\config.yml"
- remove yaml list "blocked.blocked-words" from file "plugins\AntiSwear\config.yml" from {antiswear::blockedwords::*}
- remove yaml list "blocked.blocked-domains" from file "plugins\AntiSwear\config.yml" from {antiswear::blockedwords::*}
- add yaml list "blocked.blocked-words" from "plugins\AntiSwear\config.yml" to {antiswear::blockedwords::*}
- add yaml list "blocked.blocked-domains" from "plugins\AntiSwear\config.yml" to {antiswear::blockedwords::*}
- send "%{antiswear::prefix}%Loaded" to console
- on disable:
- send "%{antiswear::prefix}%Unloaded" to console
- clear {antiswear::addons::*}
- clear {MESSAGES::*}
- clear {PLUGIN::*}
- clear {prefix}
- remove yaml list "blocked.blocked-words" from file "plugins\AntiSwear\config.yml" from {antiswear::blockedwords::*}
- every 1 second:
- remove yaml list "blocked.blocked-words" from file "plugins\AntiSwear\config.yml" from {antiswear::blockedwords::*}
- add yaml list "blocked.blocked-words" from "plugins\AntiSwear\config.yml" to {antiswear::blockedwords::*}
- command /antiswear:clearchat [<text>]:
- description: Clear the chat
- aliases: /cc, /chatclear, /chat-clear, /clear-chat, /clearchat
- permission: antiswear.clearchat
- permission message: &cInsufficent Permission.
- trigger:
- if arg 1 is set:
- loop 25 times:
- broadcast "%nl%&m------------------------"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "&8&m&l------------------------------------------"
- broadcast "&7&lChat was cleared by %executor%! Reason: %arg 1%"
- broadcast "&8&m&l------------------------------------------"
- stop trigger
- else:
- loop 25 times:
- broadcast "%nl%&m------------------------"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "%nl%"
- broadcast "&8&m&l------------------------------------------"
- broadcast "&7&lChat was cleared by %executor%!"
- broadcast "&8&m&l------------------------------------------"
- stop trigger
- command /antiswear:togglechat:
- description: Mute or Unmute chat
- aliases: /mutechat, /mchat, /stopchat, /chatstop, /mch, /antiswear:mutechat, /togglechat
- permission: antiswear.togglechat
- permission message: &cInsufficent Permission.
- trigger:
- if {antiswear::chatdisabled} is false:
- set {antiswear::chatdisabled} to true
- send "%{antiswear::prefix}%&cChat has been disabled!"
- stop trigger
- else:
- set {antiswear::chatdisabled} to false
- send "%{antiswear::prefix}%&aChat has been enabled!"
- stop trigger
- command /antiswear:addons:
- description: Main Addons Command
- aliases: /addons, /addon
- permission: antiswear.addon
- permission message: &cInsufficent Permission.
- trigger:
- send "%{antiswear::prefix}%§cThis feature has been temporarialy disabled by the Developer!"
- # Prefixes && Suffixes
- command /prefix [<text>] [<text>]:
- description: Set a player's prefix
- permission: antiswear.prefix
- permission message: &cInsufficent Permission.
- trigger:
- if arg 1 is not set:
- send "&cUsage: /prefix <player> [prefix]"
- stop
- if arg 2 is not set:
- clear {prefix.%arg 1%}
- send "Cleared %arg 1%'s prefix"
- stop
- else:
- loop all players:
- if loop-player is arg 1:
- set {prefix.%arg 1%} to coloured arg 2
- send "§aChanged %arg 1%'s prefix to §6""&r%arg 2%§6""§r"
- if {prefix.%player%} is not set:
- set {prefix.%player%} to ""
- if {suffix.%player%} is not set:
- set {suffix.%player%} to ""
- set loop-player's display name to "%{prefix.%player%}%%player%%{suffix.%player%}%"
- set loop-player's tablist name to "%{prefix.%player%}%%player%%{suffix.%player%}%"
- if {prefix.%player%} is "":
- clear {prefix.%player%}
- if {suffix.%player%} is "":
- clear {suffix.%player%}
- stop
- command /suffix [<text>] [<text>]:
- description: Set a player's suffix
- permission: antiswear.suffix
- permission message: &cInsufficent Permission.
- trigger:
- if arg 1 is not set:
- send "&cUsage: /suffix <player> [suffix]"
- stop
- if arg 2 is not set:
- clear {suffix.%arg 1%}
- send "Cleared %arg 1%'s suffix"
- stop
- else if arg 2 is set:
- loop all players:
- if loop-player is arg 1:
- set {suffix.%arg 1%} to coloured arg 2
- send "§aChanged %arg 1%'s suffix to §6""%arg 2%§6""§r"
- if {prefix.%player%} is not set:
- set {prefix.%player%} to ""
- if {suffix.%player%} is not set:
- set {suffix.%player%} to ""
- set loop-player's display name to "%{prefix.%player%}%%player%%{suffix.%player%}%"
- set loop-player's tablist name to "%{prefix.%player%}%%player%%{suffix.%player%}%"
- if {prefix.%player%} is "":
- clear {prefix.%player%}
- if {suffix.%player%} is "":
- clear {suffix.%player%}
- stop
- # Chat Modes
- command /staffchat [<text>]:
- description: Talk in staffchat
- aliases: /s, /sc
- trigger:
- player has permission "antiswear.staffchat"
- loop all players:
- loop-player has permission "antiswear.staffchat"
- send "%{MESSAGES::staffchat-prefix}% &4%sender% &e> &c%arg 1%" to loop-player
- command /chatmode [<text>] [<player>]:
- description: Change ChatMode!
- aliases: /cm
- trigger:
- player has permission "antiswear.chatmode"
- if arg 1 is not set:
- if arg 1 is "staffchat" or "staffmode" or "staff" or "sc":
- set {chatmode.%sender%} to "staffchat"
- if arg 1 is "off" or "default" or "disable":
- clear {chatmode.%sender%}
- else if arg 1 is set:
- if arg 1 is "staffchat" or "staffmode" or "staff" or "sc":
- set {chatmode.%player arg%} to "staffchat"
- if arg 1 is "off" or "default" or "disable":
- clear {chatmode.%sender%}
- command /debug:
- permission: antiswear.debug
- permission message: &cInsufficent Permission
- trigger:
- send "&cNo function set." to sender
- # end
Advertisement
Add Comment
Please, Sign In to add comment