diff --git a/examplemods/talkback.js b/examplemods/talkback.js index 46a6031..c2db73e 100644 --- a/examplemods/talkback.js +++ b/examplemods/talkback.js @@ -3,12 +3,12 @@ PluginAPI.addEventListener("processcommand", (event) => { if (event.command.toLowerCase().startsWith("/talkback")) { var message = event.command.substring("/talkback ".length); - if ( + /*if ( ModAPI.reflect.getClassById("net.minecraft.entity.player.EntityPlayerMP").instanceOf(event.sender) - ) { + ) {*/ event.sender.addChatMessage(ModAPI.reflect.getClassById("net.minecraft.util.ChatComponentText").constructors[0](ModAPI.util.str(message.toUpperCase()))); - } - event.preventDefault = false; + //} + event.preventDefault = true; } }); });