Started by
CN_SKY
on
Topic category: General discussion
I want to design a mod to replace user chat,I use the following code to accomplish this task:
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraft.client.Minecraft;
Minecraft mcclint =FMLClientHandler.instance().getClient();
mcclint.player.sendChatMessage("Test Message");
But it only works in single mode,When I use it in multiplayer mode, it doesn't work.
This mod is only installed on the client side. I don't think it's necessary to install mod on the server if you want to simulate user chat.
Please help me. Thank you very much.
I have been working for it for three days. Please help me. Thank you very much.
You can use procedures to send message to players.