mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
check if null in getItemMeta
This commit is contained in:
parent
6bc28d6b69
commit
56bd432719
@ -45,7 +45,11 @@ public final class ItemStackWrapper extends ItemStack {
|
||||
// Since this class is immutable, we can simply let the super class create one copy
|
||||
// and then store that instead of creating a clone everytime.
|
||||
// This will significantly speed up any loop comparisons if used correctly.
|
||||
return meta;
|
||||
if (meta == null) {
|
||||
throw new UnsupportedOperationException("#hasItemMeta() must be checked prior to this call");
|
||||
} else {
|
||||
return meta;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user