Use PL's itemstack checker instead

This commit is contained in:
libraryaddict 2020-03-24 12:12:01 +13:00
parent 1d0a791011
commit a598884def
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -1,5 +1,6 @@
package me.libraryaddict.disguise.utilities.params.types.custom; package me.libraryaddict.disguise.utilities.params.types.custom;
import com.comphenix.protocol.utility.MinecraftReflection;
import com.comphenix.protocol.wrappers.nbt.NbtFactory; import com.comphenix.protocol.wrappers.nbt.NbtFactory;
import me.libraryaddict.disguise.utilities.DisguiseUtilities; import me.libraryaddict.disguise.utilities.DisguiseUtilities;
import me.libraryaddict.disguise.utilities.params.types.ParamInfoEnum; import me.libraryaddict.disguise.utilities.params.types.ParamInfoEnum;
@ -65,7 +66,7 @@ public class ParamInfoItemStack extends ParamInfoEnum {
} }
// If its not a CraftItemStack // If its not a CraftItemStack
if (item.getClass().getSimpleName().equals("ItemStack") && item.hasItemMeta()) { if (!MinecraftReflection.isCraftItemStack(item) && item.hasItemMeta()) {
item = ReflectionManager.getCraftItem(item); item = ReflectionManager.getCraftItem(item);
} }