use of org.bukkit.attribute.ItemAttributeModifier in project Arcade2 by ShootGame.
the class BoundedItemModifierParser method parseNode.
@Override
protected ParserResult<BoundedItemModifier> parseNode(Node node, String name, String value) throws ParserException {
AttributeKey key = this.keyParser.parse(node.property("attribute", "attribute-key", "attributekey", "attr", "key")).orFail();
ItemAttributeModifier itemModifier = this.itemModifierParser.parseWithDefinition(node, name, value).orFail();
return ParserResult.fine(node, name, value, new BoundedItemModifier(key, itemModifier));
}
use of org.bukkit.attribute.ItemAttributeModifier in project Arcade2 by ShootGame.
the class ItemAttributeModifierParser method parseNode.
@Override
protected ParserResult<ItemAttributeModifier> parseNode(Node node, String name, String value) throws ParserException {
EquipmentSlot slot = this.slotParser.parse(node.property("slot", "equipment-slot", "equipmentslot")).orDefaultNull();
AttributeModifier modifier = this.modifierParser.parseWithDefinition(node, name, value).orFail();
return ParserResult.fine(node, name, value, new ItemAttributeModifier(slot, modifier));
}
Aggregations