mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-23 09:41:20 +01:00
Fixed the HideDye stat
This commit is contained in:
parent
68962cc1da
commit
5862e9ffbb
@ -4,13 +4,14 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.inventory.ItemFlag;
|
import org.bukkit.inventory.ItemFlag;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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.build.ItemStackBuilder;
|
||||||
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
|
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
|
||||||
import net.Indyuce.mmoitems.stat.data.BooleanData;
|
import net.Indyuce.mmoitems.stat.data.BooleanData;
|
||||||
import net.Indyuce.mmoitems.stat.data.type.StatData;
|
import net.Indyuce.mmoitems.stat.data.type.StatData;
|
||||||
import net.Indyuce.mmoitems.stat.type.BooleanStat;
|
import net.Indyuce.mmoitems.stat.type.BooleanStat;
|
||||||
import net.Indyuce.mmoitems.stat.type.ItemStat;
|
import net.Indyuce.mmoitems.stat.type.ItemStat;
|
||||||
import net.mmogroup.mmolib.MMOLib;
|
|
||||||
import net.mmogroup.mmolib.version.VersionMaterial;
|
import net.mmogroup.mmolib.version.VersionMaterial;
|
||||||
|
|
||||||
public class HideDye extends BooleanStat {
|
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" },
|
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());
|
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();
|
disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user