use of org.spongepowered.api.data.property.item.ArmorTypeProperty in project SpongeCommon by SpongePowered.
the class ArmorTypePropertyStore method getFor.
@Override
protected Optional<ArmorTypeProperty> getFor(ItemStack itemStack) {
if (itemStack.getItem() instanceof ItemArmor) {
final ItemArmor armor = (ItemArmor) itemStack.getItem();
final ItemArmor.ArmorMaterial armorMaterial = armor.getArmorMaterial();
return Optional.of(new ArmorTypeProperty((ArmorType) (Object) armorMaterial));
}
return Optional.empty();
}
Aggregations