Attribute

public enum Attribute

Useful attribute methods using reflections to circumvent API changes.

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
public static void addAttributeModifier(ItemMeta meta, EquipmentSlot slot, VersionUtil.Attribute attribute, double amount)
Add an attribute modifier to an item meta.
Link copied to clipboard
public static Object createAttributeModifier(Object attributeObject, double amount, EquipmentSlot slot)
Create an attribute modifier with support for legacy versions.
Link copied to clipboard
Get the server attribute object from this version independent enum.
Link copied to clipboard
public static void removeAttributeModifier(ItemMeta meta, VersionUtil.Attribute attribute)
Remove an attribute modifier from an item meta.
Link copied to clipboard
public static VersionUtil.Attribute valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.