Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- ChatFilter: &cSwearing is not cool!
- Prefix: &8[&cAlert&8]
- Muted: &7The chat has been temporarily muted by &n%player%&7.
- UnMuted: &7The chat has been unmuted by &n%player%&7.
- ChatCleared: &7Chat cleared by &n%player%&7.
- BypassPerm: Chat.bypass
- function contains(list: objects, check: object) :: boolean:
- loop {_list::*}:
- if {_check} contains loop-value:
- return true
- return false
- on chat:
- set {Words::*} to "shit", "fuck" and "pussy"
- if contains({Words::*}, message):
- cancel event
- send "{@ChatFilter}"
- if {Chat.Mute} is true:
- if player doesn't have the permission "{@BypassPerm}":
- cancel event
- send "&7You cannot speak while the chat is muted!"
- command /chc [<text>]:
- aliases: /chc, /chatcontrol, /chat
- permission: sk.chatcontrol
- trigger:
- if arg-1 isn't set:
- send "&cIncorrect Usage! /chc <mute/clear>"
- else:
- if arg-1 contains "mute":
- if {Chat.Mute} isn't set:
- set {Chat.Mute} to true
- broadcast ""
- broadcast "{@Muted}"
- broadcast ""
- else:
- delete {Chat.Mute}
- broadcast ""
- broadcast "{@UnMuted}"
- broadcast ""
- else if arg-1 contains "clear":
- loop 200 times:
- broadcast ""
- broadcast "{@ChatCleared}"
- command /alert [<text>]:
- permission: sk.alert
- trigger:
- if arg-1 isn't set:
- send "&cIncorrect Usage! /alert <message>"
- else:
- broadcast "{@Prefix} &7%colored arg-1%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement