v1.2.0: fixed a crash caused by non null items with null names
This commit is contained in:
@@ -276,7 +276,10 @@ public class ItemSlot extends Button {
|
||||
|
||||
@Override
|
||||
protected String hoverText() {
|
||||
if (item != null) return Messages.titleCase(item.name());
|
||||
else return super.hoverText();
|
||||
if (item != null && item.name() != null) {
|
||||
return Messages.titleCase(item.name());
|
||||
} else {
|
||||
return super.hoverText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user