Prevent NPE on null items- though not sure how it gets here.

This commit is contained in:
Nathan Wolf 2015-11-12 14:50:27 -08:00
parent c847fd0c37
commit b623f5eec8

View File

@ -164,7 +164,9 @@ public class ItemUtil implements ColorUtil {
public static String getDisplayString(ItemStack is) {
String text;
if (is == null) {
return null;
}
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount();
} else {