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

View File

@ -0,0 +1,48 @@
package org.bukkit.attribute;
/**
* Types of attributes which may be present on an {@link Attributable}.
*/
public enum Attribute {
/**
* Maximum health of an Entity.
*/
GENERIC_MAX_HEALTH,
/**
* Range at which an Entity will follow others.
*/
GENERIC_FOLLOW_RANGE,
/**
* Resistance of an Entity to knockback.
*/
GENERIC_KNOCKBACK_RESISTANCE,
/**
* Movement speed of an Entity.
*/
GENERIC_MOVEMENT_SPEED,
/**
* Attack damage of an Entity.
*/
GENERIC_ATTACK_DAMAGE,
/**
* Attack speed of an Entity.
*/
GENERIC_ATTACK_SPEED,
/**
* Armor bonus of an Entity.
*/
GENERIC_ARMOR,
/**
* Luck bonus of an Entity.
*/
GENERIC_LUCK,
/**
* Strength with which a horse will jump.
*/
HORSE_JUMP_STRENGTH,
/**
* Chance of a zombie to spawn reinforcements.
*/
ZOMBIE_SPAWN_REINFORCEMENTS;
}