-
Notifications
You must be signed in to change notification settings - Fork 0
/
Staffchat
37 lines (30 loc) · 970 Bytes
/
Staffchat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# credits to MonkeDFA
Options:
prefix: &7[&d&lStaffChat&7]
on unload:
clear {sctoggle::*}
on chat:
if {sctoggle::%uuid of player%} is true:
if player has the permission "staffchat.use":
cancel event
staffChat(player, message)
else:
clear {sctoggle::%uuid of player%}
command /sc [<text>]:
description: Staff chat, Only staff can chat.
permission: staffchat.use
permission message: &fUnknown command. Type ''/help'' for help.
aliases: /staffchat
trigger:
if arg-1 is not set:
if {sctoggle::%uuid of player%} is not set:
set {sctoggle::%uuid of player%} to true
send "&aStaff chat is now enabled."
else:
clear {sctoggle::%uuid of player%}
send "&cStaff chat is now disabled."
send "&7&oYou can still talk in staffchat using /sc <message>"
else:
staffChat(player, arg-1)
function staffChat(p: player, m: text):
send "{@prefix} &c%{_p}% &8» &r%{_m}%" to all players where [input has permission "staffchat.use"]