Fixed the HideDye stat

This commit is contained in:
ASangarin 2020-10-18 16:29:28 +02:00
parent 68962cc1da
commit 5862e9ffbb

View File

@ -4,13 +4,14 @@ import org.bukkit.Material;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import com.google.common.base.Enums;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
import net.Indyuce.mmoitems.stat.data.BooleanData;
import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.BooleanStat;
import net.Indyuce.mmoitems.stat.type.ItemStat;
import net.mmogroup.mmolib.MMOLib;
import net.mmogroup.mmolib.version.VersionMaterial;
public class HideDye extends BooleanStat {
@ -18,7 +19,7 @@ public class HideDye extends BooleanStat {
super("HIDE_DYE", new ItemStack(Material.CYAN_DYE), "Hide Dyed", new String[] { "Enable to hide the 'Dyed' tag from the item." }, new String[] { "all" },
Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS, VersionMaterial.LEATHER_HORSE_ARMOR.toMaterial());
if (MMOLib.plugin.getVersion().isBelowOrEqual(1, 16, 1))
if (!Enums.getIfPresent(ItemFlag.class, "HIDE_DYE").isPresent())
disable();
}