/
complex command.js
114 lines (94 loc) · 2.35 KB
/
complex command.js
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
///api_version=2
(script = registerScript({
name: "Multiple commands",
authors: ["CzechHek"],
version: "3.0"
})).import("Core.lib");
mineCommand = {
name: "Miner",
version: "2.3",
author: ["ur mom", "ur mom assistant"],
aliases: ["miner", "m"],
handler: {
stone: function () {
print("why", Array.prototype.slice.call(arguments));
},
diamond: function (count, radius) {
print("ore looool", count, radius);
}
}
}
killCommand = {
name: "Killer",
version: "4.0",
author: "herobrine",
handler: function (count, message) {
print("kill", count, Array.prototype.slice.call(arguments, 1).join(" "));
}
}
managerCommand = {
name: "Manager",
version: "3.0",
author: "CzechHek",
handler: {
config: {
list: {
online: function () {
print("online configs loool");
},
local: function () {
print("local configs loool");
}
},
download: [
function (name) {
print("downloading", name);
},
function (name, fileName) {
print("downloading", name, "as", fileName);
}
],
save: function (name) {
},
delete: function (name) {
},
folder: function () {
}
},
theme: {
list: {
online: function () {
},
local: function () {
}
},
download: function (name) {
},
save: function (name) {
},
load: function (name) {
},
delete: function (name) {
},
folder: function () {
}
},
script: {
list: {
online: function () {
},
local: function () {
}
},
download: function (name) {
},
delete: function (name) {
},
folder: function () {
},
reload: function () {
}
},
}
}
command = [mineCommand, killCommand, managerCommand]