//TODO Find a way to re-send the message.
public static void addChatMessageFixed(ICommandSender sender, IChatComponent message) {
        if (sender == null || message == null) return;
        if (sender instanceof EntityPlayerMP) {
            if (((EntityPlayerMP)sender).playerNetServerHandler != null) {
                sender.addChatMessage(message);
            } else {
                //TODO Find a way to re-send the message.
            }
        } else {
            sender.addChatMessage(message);
        }
    }
sender.addChatMessage(message);
} else {
//TODO Find a way to re-send the message.
}
} else {
public static void addChatMessageFixed(ICommandSender sender, IChatComponent message) {
if (sender == null || message == null) return;
if (sender instanceof EntityPlayerMP) {
if (((EntityPlayerMP)sender).playerNetServerHandler != null) {
sender.addChatMessage(message);
} else {
//TODO Find a way to re-send the message.
}
} else {
sender.addChatMessage(message);
}
}
public static void addChatMessageFixed(ICommandSender sender, IChatComponent message) {
if (sender == null || message == null) return;
if (sender instanceof EntityPlayerMP) {
if (((EntityPlayerMP)sender).playerNetServerHandler != null) {
sender.addChatMessage(message);
} else {
//TODO Find a way to re-send the message.
}
} else {
sender.addChatMessage(message);
}
}