/*
 */
package com.infinityraider.infinitylib.utility;

import java.text.MessageFormat;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.text.TextComponentString;

/**
 * Utility class for messaging players.
 */
public class MessageUtil {

    public static final void messagePlayer(EntityPlayer player, String format, Object... args) {
        String message;
        try {
            message = MessageFormat.format(format, args);
        } catch (IllegalArgumentException ex) {
            message = "Message Formatting Error: \"" + format + "\"!";
        }
        player.sendMessage(new TextComponentString(message));
    }

}

@@ -81,16 +81,83 @@
 Format;%0A
+import javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0A
 import n
@@ -369,16 +369,26 @@
 ePlayer(
+@Nullable 
 EntityPl
@@ -399,16 +399,25 @@
  player,
+ @Nonnull
  String 
@@ -454,23 +454,225 @@
     
-String message;
+// If the player is null don't do anything.%0A        if (player == null) %7B%0A            return;%0A        %7D%0A        %0A        // Holder for formatted message.%0A        String message;%0A        %0A        // Format the message.
 %0A   
@@ -861,32 +861,70 @@
 %5C%22!%22;%0A        %7D%0A
+        %0A        // Send the message.%0A
         player.s

Tweak MessageUtil