-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsilence.sk
46 lines (38 loc) · 1.65 KB
/
silence.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
41
42
43
44
45
46
# ### Chat total silence system by Roy Curtis
# ### Licensed under MIT, 2015
# ### Global variables
# silence - boolean; if set, chat is in silence mode
# ### Commands
command /silence:
description: Toggles public chat
permission: gamealition.mod-high
executable by: players and console
trigger:
if {silence} is not set:
# We're going into silence mode
set {silence} to true
broadcast "*** &c%command sender%&r has silenced all chat"
execute console command "/irc send GamealitionMC ##Gamealition *** %command sender% has silenced all chat"
execute console command "/irc sendraw GamealitionMC PRIVMSG [email protected] :mode ##Gamealition +m"
else:
# We're going out of silence mode
delete {silence}
execute console command "/irc sendraw GamealitionMC PRIVMSG [email protected] :mode ##Gamealition -m"
broadcast "*** &c%command sender%&r has un-silenced all chat"
execute console command "/irc send GamealitionMC ##Gamealition *** %command sender% has un-silenced all chat"
# ### Events
on chat:
# Conditions
{silence} is set
player doesn't have permission "gamealition.mod-high"
# Logic
send "&7*** Only staff may speak in silence mode" to player
cancel the event
on command:
# Conditions
command is "me" or "minecraft:me" or "essentials:me"
{silence} is set
player doesn't have permission "gamealition.mod-high"
# Logic
send "&7*** Only staff may speak in silence mode" to player
cancel the event