-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.sk
80 lines (78 loc) · 3.74 KB
/
example.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
on load:
if skscoreboard named "ShowCase1" of file "plugins/PluginName/withName.yml" is not created:
set title "&eWith Name" of scoreboard in file "plugins/PluginName/withName.yml" named "ShowCase1"
add line " " to scoreboard of file "plugins/PluginName/withName.yml" named "ShowCase1"
add line "&fWith Name board" to scoreboard of file "plugins/PluginName/withName.yml" named "ShowCase1"
add line " " to scoreboard of file "plugins/PluginName/withName.yml" named "ShowCase1"
add line "&erigox.club" to scoreboard of file "plugins/PluginName/withName.yml" named "ShowCase1"
send "&f[&eShowCase &f| SkScoreboard] &7Scoreboard with name created & loaded." to console
else:
send "&f[&eShowCase &f| SkScoreboard] &7Scoreboard with name loaded." to console
if skscoreboard of file "plugins/PluginName/withoutName.yml" is not created:
set title "&eWithout Name" of scoreboard in file "plugins/PluginName/withoutName.yml"
add line " " to scoreboard of file "plugins/PluginName/withoutName.yml"
add line "&fWithout Name board" to scoreboard of file "plugins/PluginName/withoutName.yml"
add line " " to scoreboard of file "plugins/PluginName/withoutName.yml"
add line "&erigox.club" to scoreboard of file "plugins/PluginName/withoutName.yml"
send "&f[&eShowCase &f| SkScoreboard] &7Scoreboard without name created & loaded." to console
else:
send "&f[&eShowCase &f| SkScoreboard] &7Scoreboard without name loaded." to console
if skscoreboard of file "plugins/SkScoreboard/flicker.yml" is not created:
set title "&b&lFLICKER DEMO" of scoreboard in file "plugins/SkScoreboard/flicker.yml"
add line " " to scoreboard of file "plugins/SkScoreboard/flicker.yml"
add line "&3%%player_x%%,%%player_y%%,%%player_z%%" to scoreboard of file "plugins/SkScoreboard/flicker.yml"
add line " " to scoreboard of file "plugins/SkScoreboard/flicker.yml"
add line "&erigox.club" to scoreboard of file "plugins/SkScoreboard/flicker.yml"
send "&f[&eShowCase &f| SkScoreboard] &7Scoreboard example created & loaded." to console
else:
send "&f[&eShowCase &f| SkScoreboard] &7Scoreboard example loaded." to console
every second:
if {skscoreboard.flicker} is set:
loop all players:
send scoreboard of file "plugins/SkScoreboard/flicker.yml" to loop-player
command /board [<text>] [<text>] [<text>]:
trigger:
if arg 1 is not set:
send "&b/board show (with|without)"
send "&b/board set-slot (slot) (text)"
send "&b/board set-title (text)"
send "&b/board hide"
send "&b/board toggle-example-flicker"
if arg 1 is "set-slot":
if arg 2 is set:
if arg 3 is set:
set pixel slot (arg-2 parsed as integer) of scoreboard of player to arg-3
send "&aDone!"
if arg 1 is "set-title":
if arg 2 is set:
set pixel title of scoreboard of player to arg-2
send "&aDone!"
if arg 1 is "set-lines":
add "a 1" to {_lines::*}
add "b 2" to {_lines::*}
add "c 3" to {_lines::*}
add "PlaceholderAPI: " to {_lines::*}
add "%%player_name%%" to {_lines::*}
set pixel lines of scoreboard of player to {_lines::*}
send "&aDone!"
if arg 1 is "show":
if arg 2 is "with":
send scoreboard of file "plugins/PluginName/withName.yml" named "ShowCase1" to player
send "&aShowing with name."
if arg 2 is "without":
send scoreboard of file "plugins/PluginName/withoutName.yml" to player
send "&aShowing without name."
if arg 1 is "toggle-example-flicker":
if {skscoreboard.flicker} is not set:
set {skscoreboard.flicker} to true
send "&aToggled Example flicker for 10 seconds"
wait 10 seconds
delete {skscoreboard.flicker}
loop all players:
hide scoreboard of loop-player
else:
delete {skscoreboard.flicker}
send "&aScoreboard OFF"
if arg 1 is "hide":
hide scoreboard of player
send "&aScoreboard hidden"