use of org.spongepowered.api.data.type.ArmorType 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