Skip to content

Commit

Permalink
Update talkback.js
Browse files Browse the repository at this point in the history
  • Loading branch information
radmanplays authored Sep 11, 2024
1 parent 59633a8 commit 53245cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examplemods/talkback.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
});
Expand Down

0 comments on commit 53245cd

Please sign in to comment.