Use ingameGUI directly to print messages to chat

This commit is contained in:
johni0702
2016-03-02 12:23:18 +01:00
parent 93585a2a30
commit b3c24ff72f

View File

@@ -366,7 +366,9 @@ public class ReplayMod {
.appendSibling(new ChatComponentText("] ")) .appendSibling(new ChatComponentText("] "))
.appendSibling(new ChatComponentTranslation(message, args).setChatStyle(new ChatStyle() .appendSibling(new ChatComponentTranslation(message, args).setChatStyle(new ChatStyle()
.setColor(warning ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GREEN))); .setColor(warning ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GREEN)));
mc.thePlayer.addChatMessage(text); // Send message to chat GUI
// The ingame GUI is initialized at startup, therefore this is possible before the client is connected
mc.ingameGUI.getChatGUI().printChatMessage(text);
} }
} }
} }