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 {
               
            }
        } 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 { } } else { sender.addchatmessage(message); } }