-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModernGive.js
44 lines (37 loc) · 1.07 KB
/
ModernGive.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
class ModernGive {
static PluginMeta = {
Name: "ModernGive",
Introduction: "This LiteLoaderBDS plugin replaces the default /give with a modern GUI /give",
Version: [1, 0, 0],
Other: {
Git: "https://github.com/marginal538/ModernGive",
License: "Apache License",
},
};
static Init() {
ll.registerPlugin(
this.PluginMeta.Name,
this.PluginMeta.Introduction,
this.PluginMeta.Version,
this.PluginMeta.Other
);
this.Main();
}
static Utils = {
RemoveStandardGiveCommand: function () {
let setup_tellCommand = NativeFunction.fromSymbol("?setup\@GiveCommand\@\@SAXAEAVCommandRegistry\@\@\@Z")
var original = setup_tellCommand.hook(function (_registry) {
return false;
})
}
}
static Main() {
// Remove standard /give
this.Utils.RemoveStandardGiveCommand();
// Register our /give commands
mc.regPlayerCmd("give", "commands.give.description", (pl) => {
pl.tell("Give command")
}, 1)
}
}
ModernGive.Init();