mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
update
This commit is contained in:
parent
a232d82851
commit
0b4904831b
@ -45,14 +45,10 @@ public class CustomItemDataService implements PersistentDataService, Keyed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Optional<String> getItemData(ItemStack item) {
|
public Optional<String> getItemData(ItemStack item) {
|
||||||
if (!item.hasItemMeta()) {
|
if (item == null || !item.hasItemMeta()) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
ItemMeta meta = item.getItemMeta();
|
return getItemData(item.getItemMeta());
|
||||||
if (meta == null) {
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
return getItemData(meta);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Optional<String> getItemData(ItemMeta meta) {
|
public Optional<String> getItemData(ItemMeta meta) {
|
||||||
|
Loading…
Reference in New Issue
Block a user