mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-24 18:18:20 +01:00
Prevent NPE on null items- though not sure how it gets here.
This commit is contained in:
parent
65862a5bd1
commit
877b593e7e
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user