mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
safety check in CustomItemDataService
This commit is contained in:
parent
56bd432719
commit
e989969713
@ -45,6 +45,9 @@ public class CustomItemDataService implements PersistentDataService, Keyed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Optional<String> getItemData(ItemStack item) {
|
public Optional<String> getItemData(ItemStack item) {
|
||||||
|
if (item.getItemMeta() == null) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
return getItemData(item.getItemMeta());
|
return getItemData(item.getItemMeta());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user