Jump to content

[1.8.9] Colored Chat Text only work in Eclipse


thedarkwelt

Recommended Posts

Dear Modding Community,

 

I want to send a colored Text Message, in the normal ChatGUI, to the Player. I use this code:

 

public static void sendMessageToPlayer(String Message){

Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentText(getSettings().getClientSettings().getShadowModColor() + "[shadowMod]:§r " + Message));

}

 

Note:

1) getShadowModColor() returns  the String "§4" -> Minecraft Colortag for Red

2) Im not sure if it is

important but the method(getShadowModColor) is located in a serializable object

 

In Eclipse the Code works ok and "ShadowMod" is red. But after recompiling(and adding it to Minecraft) the Text look like this:

"�4[shadowMod]:�r Settings saved" and everything is white.

 

I Hope you know an answer.

 

Thanked advance

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.