Add Attribute and AttributeModifier API.

Thanks to __0x277F and Meeh on #spigot-dev for implementation advice.

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2016-03-01 08:30:03 +11:00
parent 128ff503e9
commit 95de3820b4
5 changed files with 229 additions and 1 deletions
@@ -0,0 +1,16 @@
package org.bukkit.attribute;
/**
* Represents an object which may contain attributes.
*/
public interface Attributable {
/**
* Gets the specified attribute instance from the object. This instance will
* be backed directly to the object and any changes will be visible at once.
*
* @param attribute the attribute to get
* @return the attribute instance or null if not applicable to this object
*/
AttributeInstance getAttribute(Attribute attribute);
}