mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-24 22:51:18 -09:00
15 lines
792 B
JavaScript
15 lines
792 B
JavaScript
(() => {
|
|
PluginAPI.dedicatedServer.appendCode(function () {
|
|
PluginAPI.addEventListener("processcommand", (event) => {
|
|
if (event.command.toLowerCase().startsWith("/talkback")) {
|
|
var message = event.command.substring("/talkback ".length);
|
|
if (
|
|
ModAPI.hooks._teavm.$rt_isInstance(event.sender, ModAPI.hooks._classMap[ModAPI.util.getCompiledName("net.minecraft.entity.player.EntityPlayerMP")].class)
|
|
) {
|
|
event.sender.addChatMessage(ModAPI.hooks._classMap[ModAPI.util.getCompiledName("net.minecraft.util.ChatComponentText")].constructors[0](ModAPI.util.str(message.toUpperCase())));
|
|
}
|
|
event.preventDefault = true;
|
|
}
|
|
});
|
|
});
|
|
})(); |