Hello!
I was wondering how can you send a chat message, for example how can a mod type Hello(in chat you will see this as "Your_Nickname: Hello").
I already tried few things like
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("Hello"));
but that just ends up showing the message to the client, which is not what i need.
I tried player.addChatMessage(newChatComponentText("Hello")); but eclipse tells me that player can not be resolved, my friend also mentioned I needed to use
EntityPlayerSP player = Minecraft.getMinecraft().thePlayer;
which would tell me the player nickname, but this doesn't work. Anyone knows how do I do it?
Thank you in advance, Erol