-
Notifications
You must be signed in to change notification settings - Fork 2
/
flatland.sk
95 lines (78 loc) · 4.03 KB
/
flatland.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# ### Flatland whitelist system by Roy Curtis
# ### Licensed under MIT, 2015
# ### Events
on break:
player is in "world_creative" or "world_chaos" or "world_buildathon"
player doesn't have permission "gamealition.flatland"
cancel the event
execute console command "/flatland-error %player% Can't break that!"
on place:
player is in "world_creative" or "world_chaos" or "world_buildathon"
player doesn't have permission "gamealition.flatland"
cancel the event
execute console command "/flatland-error %player% Can't place that!"
on craft:
player is in "world_creative" or "world_chaos" or "world_buildathon"
player doesn't have permission "gamealition.flatland"
cancel the event
execute console command "/flatland-error %player% Can't craft that!"
on right click on anything:
player is in "world_creative" or "world_chaos" or "world_buildathon"
player doesn't have permission "gamealition.flatland"
clicked block is not a door or sign
cancel the event
execute console command "/flatland-error %player% Can't use that!"
on vehicle destroy:
attacker is in "world_creative" or "world_chaos" or "world_buildathon"
attacker doesn't have permission "gamealition.flatland"
cancel the event
execute console command "/flatland-error %attacker% Can't destroy that!"
on bucket empty:
player is in "world_creative" or "world_chaos" or "world_buildathon"
player doesn't have permission "gamealition.flatland"
cancel the event
execute console command "/flatland-error %player% Can't empty that!"
on bucket fill:
player is in "world_creative" or "world_chaos" or "world_buildathon"
player doesn't have permission "gamealition.flatland"
cancel the event
execute console command "/flatland-error %player% Can't bucket that!"
# ### Global functions
command /approve-flatland <offline player>:
description: Allows given player to build in flatland worlds
permission: gamealition.mod-high
executable by: players and console
trigger:
if arg 1 has permission "gamealition.flatland":
message "&c*** %arg 1% is already approved for flatland worlds"
exit trigger
if arg 1 doesn't have permission "gamealition.group.player":
message "&c*** %arg 1% must be fully approved for the server first (try /approve %arg 1%, then retry this command)"
exit trigger
execute console command "/perms player %arg 1% addgroup flatland"
message "*** %arg 1% can now build in flatland worlds"
if arg 1 is online:
message "*** You can now build in flatland worlds" to arg 1
command /unapprove-flatland <offline player>:
description: Denies given player to build in flatland worlds
permission: gamealition.mod-high
executable by: players and console
trigger:
if arg 1 doesn't have permission "gamealition.flatland":
message "&c*** %arg 1% isn't approved for flatland worlds"
exit trigger
execute console command "/perms player %arg 1% removegroup flatland"
message "*** %arg 1% can no longer build in flatland worlds"
if arg 1 is online:
message "*** You can no longer build in flatland worlds" to arg 1
command /flatland-error <player> <text=Can't do that!>:
description: Gives error to players who try to modify flatland worlds without rights
executable by: console
trigger:
message "*** Sending flatland approval message to %arg 1%" to console
message "&2&lCreative is restricted, %arg 1%!" to arg 1
message "&fIf you want build rights in flatland, do:" to arg 1
message " &3/modreq I'd like flatland rights; please /approve-flatland me" to arg 1
console command "/title %arg 1% times 10 60 40"
console command "/title %arg 1% subtitle [""Modifying creative worlds is restricted!""]"
console command "/title %arg 1% title {""color"":""red"",""text"":""%arg 2%""}"