Hello, I have this code
@SubscribeEvent
public static void chat(final ClientChatEvent event){
System.out.println(event.getMessage());
System.out.println(event.getMessage() == "inventory");
if (event.getMessage() == "inventory"){
Minecraft.getMinecraft().player.sendChatMessage("No");
event.setCanceled(true);
}
}
But..
[11:46:54] [Client thread/INFO] [STDOUT]: [com.example.examplemod.Blocks2:chat:39]: inventory
false
[11:46:54] [Client thread/INFO] [STDOUT]: [com.example.examplemod.Blocks2:clientChatEvent:31]: inventory
[11:46:54] [Server thread/INFO] [minecraft/MinecraftServer]: <TimTarAn> inventory
[11:46:54] [Client thread/INFO] [minecraft/GuiNewChat]: [CHAT] <TimTarAn> inventory
WTF