use of org.bukkit.block.data.Ageable in project Denizen-For-Bukkit by DenizenScript.
the class MaterialAge method registerTags.
public static void registerTags() {
// <--[tag]
// @attribute <MaterialTag.maximum_age>
// @returns ElementTag(Number)
// @group properties
// @description
// Returns the maximum age for an ageable material. This includes plant growth.
// -->
PropertyParser.PropertyTagWithReturn<MaterialAge, ElementTag> runnable = (attribute, material) -> {
return new ElementTag(material.getMax());
};
PropertyParser.registerStaticTag(ElementTag.class, "maximum_age", runnable);
PropertyParser.registerStaticTag(ElementTag.class, "maximum_plant_growth", runnable);
// <--[tag]
// @attribute <MaterialTag.age>
// @returns ElementTag(Number)
// @mechanism MaterialTag.age
// @group properties
// @description
// Returns the current age for an ageable material. This includes plant growth.
// -->
runnable = (attribute, material) -> {
return new ElementTag(material.getCurrent());
};
PropertyParser.registerStaticTag(ElementTag.class, "age", runnable);
PropertyParser.registerStaticTag(ElementTag.class, "plant_growth", runnable);
}
Aggregations