mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-25 07:01:20 -09:00
15 lines
633 B
JavaScript
15 lines
633 B
JavaScript
//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;
|
|
}
|
|
});
|
|
});
|
|
})();
|