Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
# Chat Manager Skript by Carlo ( Spark )
# |----------------------------------------|
# | |
# | Configuartion |
# | |
# |----------------------------------------|
options:
p: &4[&cChatManager&4]
noperm: &cYou don't have the right permission to execute that command!
header: &4&l&m|----------&c&l Chat Manager &4&l&m----------|
footer: &4&l&m|---------------------------------|
isoffline: &cThat player is offline!
needop: &cYou need to be OP to execute this command!
version: 1.0.1
# Permissions:
clearchatperm: chatmanager.clearchat
clearchatbypassperm: chatmanager.clearchat.bypass
clearchatselfperm: chatmanager.clearchat.self
lockchatperm: chatmanager.lockchat
muteperm: chatmanager.mute
unmuteperm: chatmanager.unmute
checkmuteperm: chatmanager.checkmute
broadcastperm: chatmanager.broadcast
helpperm: chatmanager.help
scperm: chatmanager.staffchat
acperm: chatmanager.adminchat
cmdspyperm: chatmanager.commandspy
reloadperm: chatmanager.reload
chatcolorhelpperm: chatmanager.chatcolor.help
chatcolorresetperm: chatmanager.chatcolor.reset
chatcolorsetperm: chatmanager.chatcolor.set
chatcoloraddperm: chatmanager.chatcolor.add
chatcoloraddallperm: chatmanager.chatcolor.addall
checkrankperm: chatmanager.rank.check
# Chat Format
chatformat: true
prefix-or-suffix: "prefix"
# Don't put the rank here! Skript will do it automaticly when you choose Prefix or Suffix
chatformatprefix: %{rank.%player%}%&7 %player's displayname% &8» %{chatcolor.%player%}%
chatformatsuffix: &7%player's displayname% %{rank.%player%}% &8» %{chatcolor.%player%}%
# Chat Color
defaultchatcolor: &7
# Ranks
defaultrank: &7Player
# Clear Chat
clearchatdone: &cThe chat has been cleared by &4%player%
cccooldown: 5 minutes
# Clear Chat Self
ccselfcooldown: 5 minutes
# Chat Lock
chatislocked: &cThe chat is currently locked!
chatlockedtrue: &cThe chat has been locked by &4%player%
chatlockedfalse: &cThe chat has been unlocked by &4%player%
chatalreadylocked: &cThe chat is already locked!
chatalreadyunlocked: &cThe chat is already unlocked!
# Staff Chat
scp: &4[&cStaff Chat&4]
# Admin Chat
acp: &4[&cAdmin Chat&4]
# Mute
alreadymuted: &4%arg 1% &cis already muted!
youaremuted: &cYou are muted by &4%player% &cfor %arg 2%
# Unmute
notmuted: &4%arg 1% &cis not muted!
# Broadcast
bcp: &4[&cBroadcast&4]
# CommandSpy
cmdspyp: &4[&cCommandSpy&4]
every 10 second:
if {chatmanager.locked} is not set:
set {chatmanager.locked} to false
every 1 second:
if {chat.notify.updates} is not set:
set {chat.notify.updates} to true
on script load:
loop all players:
if loop-player is op:
if {chat.notify.updates} is true:
if text from "https://pastebin.com/raw/1cfDwCeh" is not "{@version}":
set {_chat.newversion} to text from "https://pastebin.com/raw/1cfDwCeh"
send "{@header}" to loop-player
send " &4&l• &c&lA new update is available!" to loop-player
send " &4&l• &c&lYour Version: &4&l{@version}" to loop-player
send " &4&l• &c&lNew Version: &4&l%{_chat.newversion}%" to loop-player
send " &4&l• &c&l=> &4&nhttps://www.spigotmc.org/resources/chatmanager.57167/" to loop-player
send "{@footer}" to loop-player
stop
on join:
if player is op:
if {chat.notify.updates} is true:
if text from "https://pastebin.com/raw/1cfDwCeh" is not "{@version}":
set {_chat.newversion} to text from "https://pastebin.com/raw/1cfDwCeh"
send "{@header}"
send " &4&l• &c&lA new update is available!"
send " &4&l• &c&lYour Version: &4&l{@version}"
send " &4&l• &c&lNew Version: &4&l%{_chat.newversion}%"
send " &4&l• &c&l=> &4&nhttps://www.spigotmc.org/resources/chatmanager.57167/"
send "{@footer}"
stop
loop all players:
if {rank.%loop-player%} is not set:
set {rank.%loop-player%} to "{@defaultrank}"
if {chatcolor.%loop-player%} is not set:
set {chatcolor.%loop-player%} to "{@defaultchatcolor}"
# The Chat Format
on chat:
if {@chatformat} is true:
if {@prefix-or-suffix} is "prefix":
cancel event
broadcast "{@chatformatprefix}%message%"
if {@prefix-or-suffix} is "suffix":
cancel event
broadcast "{@chatformatsuffix}%message%"
else:
stop
# |----------------------------------------|
# | |
# | All Commands |
# | |
# |----------------------------------------|
command /chat [<text>] [<text>]:
permission: {@helpperm}
permission message: {@noperm}
aliases: /chatmanager
trigger:
if arg 1 is not set:
execute player command "/chat help"
if arg 1 is not "help" or "lock" or "unlock" or "reload" or "notifyupdate":
send "{@p} &cUnknow Argument!"
if arg 1 is "help":
if arg 2 is not "1" or "2" or "3":
send "{@p} &cUse &4/chat help [1/2/3] &cto see all the commands!"
stop
if arg 2 is not set:
send "{@header}"
send ""
send "&c/chat help &7&l&m|&f This Command"
send "&c/chat lock/unlock &7&l&m|&f Lock/Unlock the global chat"
send "&c/clearchat &7&l&m|&f Clear the global chat"
send "&c/clearchatself &7&l&m|&f Clear your own chat"
send "&c/sc &7&l&m|&f Enable/Disable the Staff Chat"
send "&c/ac &7&l&m|&f Enable/Disable the Admin Chat"
send "&c/commandspy &7&l&m|&f Enable or Disable your command spy"
send ""
send "&cType &4/chat help 2 &cfor the Second Help Page"
send ""
send "{@footer}"
if arg 2 is "1":
send "{@header}"
send ""
send "&c/chat help &7&l&m|&f This Command"
send "&c/chat lock/unlock &7&l&m|&f Lock/Unlock the global chat"
send "&c/clearchat &7&l&m|&f Clear the global chat"
send "&c/clearchatself &7&l&m|&f Clear your own chat"
send "&c/sc &7&l&m|&f Enable/Disable the Staff Chat"
send "&c/ac &7&l&m|&f Enable/Disable the Admin Chat"
send "&c/commandspy [on/off] &7&l&m|&f Enable or Disable your command spy"
send ""
send "&cType &4/chat help 2 &cfor the Second Help Page"
send ""
send "{@footer}"
if arg 2 is "2":
send "{@header}"
send ""
send "&c/chat reload &7&l&m|&f Reload the Skript"
send "&c/mute [player] ([reason]) ([time]) &7&l&m|&f Mute someone"
send "&c/unmute [player] &7&l&m|&f Unmute a muted player"
send "&c/checkmute [player] &7&l&m|&f Check if someone is muted"
send "&c/bc &7&l&m|&f Broadcast a message to everyone on the server"
send "&c/broadcast &7&l&m|&f Same as /bc"
send "&c/chat notifyupdate [true/false] &7&l&m|&f Enable or Disable for notifying new updates! ( Only to OP )"
send ""
send "&cType &4/chat help 3 &cfor the First Help Page"
send ""
send "{@footer}"
if arg 2 is "3":
send "{@header}"
send ""
send "&c/chatcolor help &7&l&m|&f View The ChatColor Command Help"
send "&c/rank help &7&l&m|&f View the Rank Command Help"
send ""
send "&cYou are on the last help page!"
send ""
send "{@footer}"
# Lock Command
if arg 1 is "lock":
if player has permission "{@lockchatperm}":
if {chatmanager.locked} is true:
send "{@p} {@chatalreadylocked}"
else:
send "{@p} &cYou locked the chat!"
broadcast "{@p} {@chatlockedtrue}"
set {chatmanager.locked} to true
else:
send "{@noperm}"
if arg 1 is "unlock":
if player has permission "{@lockchatperm}":
if {chatmanager.locked} is false:
send "{@p} {@chatalreadyunlocked}"
else:
send "{@p} &cYou unlocked the chat!"
broadcast "{@p} {@chatlockedfalse}"
set {chatmanager.locked} to false
else:
send "{@noperm}"
# Reload Command
if arg 1 is "reload":
if player has permission "{@reloadperm}":
execute player command "sk reload ChatManager"
send "{@p} &aSkript Reloaded!"
else:
send "{@noperm}"
# NotifyUpdate Command
if arg 1 is "notifyupdate":
if arg 2 is not set:
if player is op:
send "{@p} &cUse &4/chat notifyupdate [True/False] &cto Enable or Disable Notifications on updates!"
else:
send "{@p} {@needop}"
if arg 2 is "true":
if player is op:
if {chat.notify.updates} is false:
set {chat.notify.updates} to true
send "{@p} &cAll OP'S will now be notified when their is a new version of &4&lChatManager"
else:
send "{@p} &cNotifications are already turned on!"
else:
send "{@p} {@needop}"
if arg 2 is "false":
if player is op:
if {chat.notify.updates} is true:
set {chat.notify.updates} to false
send "{@p} &cAll OP'S will no longer be notified when their is a new version of &4&lChatManager"
else:
send "{@p} &cNotifications are already turned off!"
else:
send "{@p} {@needop}"
# Chat Color
command /chatcolor [<text>] [<offline player>] [<text>]:
aliases: /ch, /chatcolors
trigger:
if arg 1 is not set:
set {_chatcolors.size} to size of {chatcolors.%player%::*}
if {_chatcolors.size} is greater than 0:
open chest with 3 rows named "&c&lChat Colors" to player
set {_slot} to 0
loop {chatcolors.%player%::*}:
format slot {_slot} of player with 339 named "§%loop-value%Color" with lore "&7Click me to enable||&7the §%loop-value%%loop-value% &7ChatColor!" to close
add 1 to {_slot}
format slot 22 of player with 160:14 named "&c&lReset" with lore "&7Click here to reset your chatcolor" to close then run [execute console command "ch set %player% 7"]
else:
send "{@p} &cYou don't have any chat colors!"
if arg 1 is not "help" or "add" or "addall" or "set" or "reset":
send "{@p} &cUnknown Argument!"
if arg 1 is "help":
if player has permission "{@chatcolorhelpperm}":
send "{@header}"
send ""
send ""
send "&c/chatcolor &7&l&m|&f Choose a chat color"
send "&c/chatcolor set [player] [Color Code] &7&l&m|&f Set a player's chat color"
send "&c/chatcolor add [Player] [Color Code] &7&l&m|&f Add a color to a player"
send "&c/chatcolor addall [Player] &7&l&m|&f Add all the colors to a player"
send "&c/chatcolor reset [player] &7&l&m|&f Remove ALL colors from a player"
send ""
send "{@footer}"
else:
send "{@noperm}"
if arg 1 is "reset":
if executor is player:
if player has permission "{@chatcolorresetperm}":
if arg 2 is set:
if arg 2 is online:
if arg 3 is not set:
clear {chatcolors.%arg 2%::*}
send "{@p} &cAll colors form &4%arg 2% &ccleared!"
send "{@p} &cAll your chat colors have been cleared by &4%player%" to arg 2
else:
send "{@p} &cTo many arguments!"
else:
send "{@p} {@isoffline}"
else:
send "{@p} &cUse &4/chatcolor reset [player] &cto reset all someone's chatcolors!"
else:
send "{@noperm}"
if executor is console:
if arg 2 is set:
if arg 2 is online:
if arg 3 is not set:
clear {chatcolors.%arg 2%::*}
send "{@p} &cAll colors form &4%arg 2% &ccleared!"
send "{@p} &cAll your chat colors have been cleared by &4Console" to arg 2
else:
send "{@p} &cTo many arguments!"
else:
send "{@p} {@isoffline}"
else:
send "{@p} &cUse &4/chatcolor reset [player] &cto reset all someone's chatcolors!"
if arg 1 is "set":
if executor is player:
if player has permission "{@chatcolorsetperm}":
if arg 2 is set:
if arg 3 is not "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "0" or "a" or "b" or "d" or "c" or "e" or "f":
send "{@p} &cThat is not a color code!"
stop
if arg 3 is not set:
send "{@p} &cUse &4/chatcolor %arg 1% %arg 2% [color] &cto set the chat color from someone!"
stop
else:
if arg 2 is online:
set {chatcolor.%arg 2%} to "§%arg 3%"
send "{@p} &cYou Chat Color has been set to: %{chatcolor.%arg 2%}%TEXT" to arg 2
else:
send "{@p} {@isoffline}"
else:
send "{@p} &cUse &4/chatcolor %arg 1% [player] [color] &cto set the chat color from someone!"
else:
send "{@noperm}"
if executor is console:
if arg 2 is set:
if arg 3 is not "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "0" or "a" or "b" or "d" or "c" or "e" or "f":
send "{@p} &cThat is not a color code!"
if arg 3 is not set:
send "{@p} &cUse &4/chatcolor %arg 1% %arg 2% [color] &cto set the chat color from someone!"
stop
else:
if arg 2 is online:
set {chatcolor.%arg 2%} to "§%arg 3%"
send "{@p} &cSet the color to &4%arg 2%" to console
send "{@p} &cYou Chat Color has been set to: §%arg 3%TEXT" to arg 2
else:
send "{@p} {@isoffline}"
else:
send "{@p} &cUse &4/chatcolor %arg 1% [player] [color] &cto set the chat color from someone!"
if arg 1 is "add":
if player has permission "{@chatcoloraddperm}":
if arg 2 is set:
if arg 3 is not "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "0" or "a" or "b" or "d" or "c" or "e" or "f":
send "{@p} &cThat is not a color code!"
else:
if arg 2 is online:
remove arg 3 from {chatcolors.%arg 2%::*}
add arg 3 to {chatcolors.%arg 2%::*}
send "{@p} &cAdded the color to &4%arg 2%"
send "{@p} &cYou received a chat color!" to arg 2
else:
send "{@p} {@isoffline}"
if arg 3 is not set:
send "{@p} &cUse &4/chatcolor %arg 1% %arg 2% [color] &cto add a chat color to someone!"
else:
send "{@p} &cUse &4/chatcolor %arg 1% [player] [color] &cto add a chat color to someone!"
else:
send "{@noperm}"
if arg 1 is "addall":
if player has permission "{@chatcoloraddallperm}":
if arg 2 is set:
if arg 2 is online:
if arg 3 is not set:
clear {chatcolors.%arg 2%::*}
add "1" to {chatcolors.%arg 2%::*}
add "2" to {chatcolors.%arg 2%::*}
add "3" to {chatcolors.%arg 2%::*}
add "4" to {chatcolors.%arg 2%::*}
add "5" to {chatcolors.%arg 2%::*}
add "6" to {chatcolors.%arg 2%::*}
add "7" to {chatcolors.%arg 2%::*}
add "8" to {chatcolors.%arg 2%::*}
add "9" to {chatcolors.%arg 2%::*}
add "0" to {chatcolors.%arg 2%::*}
add "a" to {chatcolors.%arg 2%::*}
add "b" to {chatcolors.%arg 2%::*}
add "c" to {chatcolors.%arg 2%::*}
add "e" to {chatcolors.%arg 2%::*}
add "d" to {chatcolors.%arg 2%::*}
add "f" to {chatcolors.%arg 2%::*}
send "{@p} &cAll colors have been added to you!"
send "{@p} &cYou have added all the colors to &4%arg 2%"
else:
send "{@p} &cTo many arguments!"
else:
send "{@p} {@isoffline}"
else:
send "{@p} &cUse &4/chatcolor addall [player] &cto add all the colors to a player"
else:
send "{@noperm}"
# Rank
command /checkrank [<offline player>]:
permission: {@checkrankperm}
permission message: {@noperm}
aliases:/ cr
trigger:
if arg 1 is not set:
send "{@p} &cUse &4/checkrank [player] &cto check someones rank!"
if arg 1 is set:
if arg 1 is online:
send "{@header}"
send ""
send " &4&l• &cUser you are checking: &4%arg 1%"
send " &4&l• &c%arg 1%'s rank: &7%{rank.%arg 1%}%"
send ""
send "{@footer}"
command /rank [<text>] [<offline player>] [<text>]:
permission: rank.admin
permission message: &8[&4&lYou&f<ube&8] &cNo Permissions!
trigger:
if arg 1 is not set:
send "{@header}"
send ""
send "&c/rank set [player] [rank] &f&l&m|&f Set someones rank"
send "&c/rank reset [player] &7&l&m|&f Reset someones rank to the default rank"
send "&c/checkrank [player] &7&l&m|&f Check someones rank"
send "&c/rank help &7&l&m|&f This message"
send ""
send "{@footer}"
if arg 1 is "set":
if arg 2 is set:
if arg 3 is set:
set {rank.%arg 2%} to "%coloured arg 3%"
send "{@p} &cRank of &4%arg 2% &chas been set to: &7%coloured arg 3%"
send "{@p} &cYour rank has been set to: &7%coloured arg 3%"
else:
send "{@p} &cUse &4/rank %arg 1% %arg 2% [rank] &cto change someones rank!"
else:
send "{@p} &cUse &4/rank %arg 1% [player] [rank] &cto change someones rank!"
if arg 1 is "reset":
if arg 2 is set:
set {rank.%arg 2%} to "{@defaultrank}"
send "{@p} &cThe rank of &4%arg 2% &chas been reset to {@defaultrank}"
send "{@p} &cYour rank has been reset by &4%player%! &cYour current rank is now {@defaultrank}" to arg 2
else:
send "{@p} &cUse &4/rank %arg 1% [player] &cto reset someones rank to {@defaultrank}"
# Lock Chat
on chat:
if {chatmanager.locked} is true:
cancel event
send "{@p} {@chatislocked}"
# ClearChat Command
command /cc:
permission: {@clearchatperm}
permission message: {@noperm}
aliases: /clearchat, /clearc, /cclear
trigger:
set {_waited} to difference between {cc.%player%.lastused} and now
if {_waited} is less than {@ccselfcooldown}:
send "{@p} &cYou need to wait &4%difference between {@cccooldown} and {_waited}% &cbefore doing that command again!!"
stop
else:
set {cc.%player%.lastused} to now
loop all players:
if loop-player doesn't have permission "{@clearchatbypassperm}":
loop 300 times:
send "" to loop-player
send "{@p} {@clearchatdone}" to loop-player
# ClearChat Self Command
command /ccself:
permission: {@clearchatselfperm}
permission message: {@noperm}
aliases: /clearchatself
trigger:
set {_waited} to difference between {ccself.%player%.lastused} and now
if {_waited} is less than {@ccselfcooldown}:
send "{@p} &cYou need to wait &4%difference between {@ccselfcooldown} and {_waited}% &cbefore doing that command again!!"
stop
else:
set {ccself.%player%.lastused} to now
loop 300 times:
send "" to player
wait 2 ticks
send "{@p} &cYou cleared your own chat!"
# Staff Chat Command
command /sc [<text>]:
permission: {@scperm}
permission message: {@noperm}
aliases: /staffchat
trigger:
if arg 1 is not set:
send "{@p} &cUse &4/sc [message] &cto send something in the Staff Chat"
if arg 1 is set:
loop all players:
if loop-player has permission "{@scperm}":
send "{@scp} &c%player% &4&l&m»&7 %arg 1%" to loop-player
else:
stop
# Admin Chat Command
command /ac [<text>]:
permission: {@acperm}
permission message: {@noperm}
aliases: /adminchat
trigger:
if arg 1 is not set:
send "{@p} &cUse &4/ac [message] &cto send something in the Admin Chat"
if arg 1 is set:
loop all players:
if loop-player has permission "{@acperm}":
send "{@acp} &c%player% &4&l&m»&7 %arg 1%" to loop-player
else:
stop
# Mute Command
command /mute [<offline player>] [<text>]:
permission: {@muteperm}
permission message: {@noperm}
trigger:
if arg 1 is not set:
send "{@p} &cUse &4/mute [player] [reason] &cto mute someone"
if arg 1 is set:
if arg 2 is set:
if arg 1 is online:
if {muted.%arg 1%} is false:
set {muted.%arg 1%} to true
broadcast "{@p} &4%arg 1% &cis muted by &4%player% &cfor &4%arg 2%"
send "{@p} &4%arg 1% &cis now muted!"
send "{@p} &cYou have been muted by &4%player%&c!" to arg 1
set {mute.%arg 1%.by} to player
set {mute.%arg 1%.when} to now
set {mute.%arg 1%.reason} to arg 2
if {mutes.%arg 1%} is not set:
set {mutes.%arg 1%} to 0
add 1 to {mutes.%arg 1%}
else:
send "{@p} {@alreadymuted}"
else:
send "{@p} {@isoffline}"
else:
send "{@p} &cUse &4/mute [player] [reason] &cto mute someone"
on chat:
if {muted.%player%} is true:
cancel event
send "{@p} &cYou are muted! You are not able to chat!" to player
# Unmute Command
command /unmute [<Offline Player>]:
permission: {@unmuteperm}
permission message: {@noperm}
trigger:
if arg 1 is not set:
send "{@p} &cUse &4/unmute [player] &cto unmute someone"
if arg 1 is set:
if arg 1 is online:
if {muted.%arg 1%} is true:
set {muted.%arg 1%} to false
broadcast "{@p} &4%arg 1% &cis unmuted by &4%player%&c!"
send "{@p} &cYou have been unmuted by &4%player%" to arg 1
send "{@p} &4%arg 1% &cis now unmuted!"
else:
send "{@p} {@notmuted}"
else:
send "{@p} {@isoffline}"
# MuteCheck Command
every 1 second:
loop all players:
if {mutes.%loop-player%} is not set:
set {mutes.%loop-player%} to 0
else:
stop
command /mutecheck [<offline player>]:
permission: {@checkmuteperm}
permission message: {@noperm}
aliases: /checkmute
trigger:
if arg 1 is set:
if arg 1 is online:
if {muted.%arg 1%} is true:
send "{@header}"
send ""
send " &4&l• &cMuted by &4%{mute.%arg 1%.by}%"
send " &4&l• &cMuted on &4%{mute.%arg 1%.when}%"
send " &4&l• &cMuted for &4%{mute.%arg 1%.reason}%"
send " &4&l• &4%arg 1% &chas a total of &4%{mutes.%arg 1%}% Mute(s)"
send ""
send "{@footer}"
else:
send "{@header}"
send ""
send " &4&l• &4%arg 1% &cis not muted!"
send " &4&l• &4%arg 1% &chas a total of &4%{mutes.%arg 1%}% Mute(s)"
send ""
send "{@footer}"
else:
send "{@p} {@isoffline}"
else:
send "{@p} &cUse &4/mutecheck [player] &cto check if someone is muted"
# Broadcast/Bc Command
command /bc [<text>]:
permission: {@broadcastperm}
permission message: {@noperm}
aliases: /broadcast
trigger:
if arg 1 is set:
loop all players:
send "{@bcp} &f%coloured arg 1%" to loop-player
else:
send "{@p} &cUse &4/bc [message] &cto broadcast something to the whole server"
# CommandSpy Command
command /commandspy:
permission: {@cmdspyperm}
permission message: {@noperm}
aliases: /cmdspy
trigger:
if {commandspy::%executor%} is not set:
set {commandspy::%executor%} to true
message "{@cmdspyp} &7Command Spy &aenabled!"
stop
if {commandspy::%executor%} is true:
set {commandspy::%executor%} to false
message "{@cmdspyp} &7Command Spy &cdisabled!"
stop
if {commandspy::%executor%} is false:
set {commandspy::%executor%} to true
message "{@cmdspyp} &7Command Spy &aenabled!"
stop
on command:
if sender is a player:
loop all players:
if {commandspy::%loop-player%} is true:
loop-player has permission "{@cmdspyperm}":
if player is not loop-player:
send "{@p} &c%executor%: &7/%complete command%" to loop-player