mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-24 14:41:18 -09:00
Create Worldedit.js
This commit is contained in:
parent
53245cd65a
commit
359ecc0506
14
examplemods/Worldedit.js
Normal file
14
examplemods/Worldedit.js
Normal file
@ -0,0 +1,14 @@
|
||||
//WIP worldedit by radmanplays
|
||||
|
||||
(() => {
|
||||
const prefix = "[worldedit] "
|
||||
PluginAPI.dedicatedServer.appendCode(function () {
|
||||
PluginAPI.addEventListener("processcommand", (event) => {
|
||||
if (event.command.toLowerCase().startsWith("//wand")) {
|
||||
event.sender.sendChatMessage(ModAPI.util.str("/give @s wooden_axe"))
|
||||
event.sender.addChatMessage(ModAPI.reflect.getClassById("net.minecraft.util.ChatComponentText").constructors[0](ModAPI.util.str(prefix + "a wand has been added to your inventory")));
|
||||
event.preventDefault = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
})();
|
Loading…
x
Reference in New Issue
Block a user