use of org.bukkit.inventory.ItemFlag in project Denizen-For-Bukkit by DenizenScript.
the class ItemFlags method flags.
public dList flags() {
dList output = new dList();
ItemStack itemStack = item.getItemStack();
if (itemStack.hasItemMeta()) {
for (ItemFlag flag : itemStack.getItemMeta().getItemFlags()) {
output.add(flag.name());
}
}
return output;
}
use of org.bukkit.inventory.ItemFlag in project Glowstone by GlowstoneMC.
the class GlowMetaItem method getItemFlags.
@Override
public Set<ItemFlag> getItemFlags() {
Set<ItemFlag> currentFlags = EnumSet.noneOf(ItemFlag.class);
ItemFlag[] values;
for (int length = (values = ItemFlag.values()).length, i = 0; i < length; ++i) {
ItemFlag f = values[i];
if (hasItemFlag(f)) {
currentFlags.add(f);
}
}
return currentFlags;
}
Aggregations