mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-25 02:28:12 +01:00
Prevent NPE on null items- though not sure how it gets here.
This commit is contained in:
parent
c847fd0c37
commit
b623f5eec8
@ -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