-
Notifications
You must be signed in to change notification settings - Fork 0
/
staffchat.sk
40 lines (39 loc) · 1.36 KB
/
staffchat.sk
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
38
39
40
options:
prefix: "$"
name: "Event"
on chat:
if first character of message = {@prefix}:
if player has permission "staff.chat":
set {_sc} to message
replace {@prefix} in {_sc} with ""
if {_sc} is not "":
cancel event
loop all players:
replace {@prefix} in message with ""
if loop-player has permission "staff.chat":
if {scd.%loop-player's uuid%} is not true:
send "&b&l[S]&r&3 [%{@name}%]&r &4%player%&r&7:&b %message%" to loop-player
if {scd::*} contains player's uuid:
send "&cWarn &8| &cYou have staff chat &4disabled&c however your message was still sent!"
else:
cancel event
send "&cError &8| &cYour message is &4Undefined&c!"
command togglestaffchat:
permission: staff.chat
trigger:
if {scd.%player's uuid%} is not true:
send "&cDisabled &8| &cDisabled your &4staff chat&c!"
set {scd.%player's uuid%} to true
else:
send "&aEnabled &8| &aEnabled your &2staff chat&a!"
set {scd.%player's uuid%} to false
command staffchat <text>:
permission: staff.chat
aliases: /sc
trigger:
loop all players:
if loop-player has permission "staff.chat":
if {scd::*} doesn't contain player's uuid:
send "&b&l[S]&r&3 [%{@name}%]&r &4%player%&r&7:&b %arg-1%" to loop-player
if {scd::*} contains player's uuid:
send "&cWarn &8| &cYou have staff chat &4disabled&c however your message was still sent!"