From 53245cd65a4f10c5617687659a7bfc9f24287be3 Mon Sep 17 00:00:00 2001 From: radmanplays <95340057+radmanplays@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:34:30 +0330 Subject: [PATCH] Update talkback.js --- examplemods/talkback.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } }); });