Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /chat [<text>]:
- trigger:
- if player has the permission "Chat.manage":
- if arg-1 isn't set:
- send "&cUsage: /chat <Mute/Clear/Unmute>"
- else if arg-1 is set:
- if arg-1 is "mute":
- set {ChatMuted} to true
- broadcast ""
- broadcast "&c%executor% &7has muted the chat."
- broadcast ""
- if arg-1 contains "Clear":
- loop 150 times:
- broadcast ""
- broadcast "&7Chat has been cleared by &c%executor%&7."
- if arg-1 is "Unmute":
- delete {ChatMuted}
- broadcast ""
- broadcast "&c%executor% &7has unmuted the chat."
- broadcast ""
- else:
- send "&cInsufficient Permissions!"
- on chat:
- if {Muted::%player%} or {PermanentMute::%player%} is true:
- cancel event
- send "&cYou cannot talk while muted."
- if {ChatMuted} is true:
- if player doesn't have the permission "Staff":
- cancel event
- send "&cYou cannot talk while chat is muted."
- set chat format to "%colored player's prefix%%player%&f: &f%message%"
- set chat format to "%colored player's prefix%%player%&f: &f%message%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement