Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /chat [<string>] [<integer>] [<text>]:
- permission: command.chat
- permission message: §cYou do not have the required permission to use this command.
- trigger:
- if arg 1 is not set:
- message "&7&m--------------------------"
- message "&9&lChat Commands"
- message "&e/chat mute"
- message "&e/chat delay (seconds)"
- message "&e/chat clear"
- message "&7&m--------------------------"
- else:
- if arg 1 is "mute":
- if {chat} is false:
- message "&aYou have unmuted chat."
- loop all players:
- if loop-player has permission "chat.notify.action" or "*" or "chat.*" or "chat.notify.*":
- message "&b[S] &a%player% has unmuted the chat." to loop-player
- broadcast "&aThe chat has been unmuted."
- delete {chat}
- else:
- message "&cYou have muted chat."
- loop all players:
- if loop-player has permission "chat.notify.action" or "*" or "chat.*" or "chat.notify.*":
- message "&b[S] &3%player% has muted the chat." to loop-player
- broadcast "&cThe chat has been muted."
- set {chat} to false
- else if arg 1 is "delay":
- if arg 2 is not set:
- if {chat-delay} is set:
- delete {chat-delay}
- message "&aYou have removed chat delay."
- loop all players:
- if loop-player has permission "chat.notify.action" or "*" or "chat.*" or "chat.notify.*":
- message "&b[S] &3%player% has disabled chat delay." to loop-player
- else:
- message "&cChat is not delayed."
- else:
- if arg 2 is greater than 5:
- message "&cError: Cannot est the chat delay more than 5."
- else:
- set {chat-delay} to 5
- loop all players:
- if loop-player has permission "chat.notify.action" or "*" or "chat.*" or "chat.notify.*":
- message "&b[S] &3%player% has enabled chat delay. &7(%arg-2%&7s)" to loop-player
- else if arg 1 is "clear":
- loop 150 times:
- broadcast ""
- broadcast "&3The chat has been cleared."
- loop all players:
- if loop-player has permission "chat.notify.action" or "*" or "chat.*" or "chat.notify.*":
- message "&b[S] &3%player% has cleared the chat." to loop-player
- on load:
- on chat:
- if {chat} is set:
- if player does not have permission "chat.bypass.mute" or "*" or "chat.*" or "chat.bypass.*":
- cancel event
- message "&cThe chat is currently muted and you are unable to talk."
- if {chat-delay} is set:
- if player does not have permission "chat.bypass.delay" or "chat.*" or "*" or "chat.bypass.*":
- if {chat-delay.%player%} is not set:
- set {chat-delay.%player%} to {chat-delay}
- else:
- cancel event
- message "&cChat is currently delayed. You can chat in another &l%{chat-delay.%player%}% seconds&c."
- every second:
- if {chat-delay} is set:
- loop all players:
- if {chat-delay.%loop-player%} is 1 or 2 or 3 or 4 or 5:
- remove 1 from {chat-delay.%loop-player%}
- else:
- delete {chat-delay.%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement