1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

allow null meta

This commit is contained in:
Josh 2020-06-12 17:09:57 -04:00 committed by GitHub
parent 7249a92bad
commit 6bc28d6b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,8 +26,12 @@ public final class ItemStackWrapper extends ItemStack {
public ItemStackWrapper(ItemStack item) { public ItemStackWrapper(ItemStack item) {
super(item.getType()); super(item.getType());
meta = item.getItemMeta();
hasItemMeta = item.hasItemMeta(); hasItemMeta = item.hasItemMeta();
if (hasItemMeta) {
meta = item.getItemMeta();
} else {
meta = null;
}
} }
@Override @Override