Package org.bukkit.attribute
Interface AttributeInstance
public interface AttributeInstance
Represents a mutable instance of an attribute and its associated modifiers
 and values.
- 
Method SummaryModifier and Type Method Description voidaddModifier(AttributeModifier modifier)Add a modifier to this instance.AttributegetAttribute()The attribute pertaining to this instance.doublegetBaseValue()Base value of this instance before modifiers are applied.doublegetDefaultValue()Gets the default value of the Attribute attached to this instance.Collection<AttributeModifier>getModifiers()Get all modifiers present on this instance.doublegetValue()Get the value of this instance after all associated modifiers have been applied.voidremoveModifier(AttributeModifier modifier)Remove a modifier from this instance.voidsetBaseValue(double value)Set the base value of this instance.
- 
Method Details- 
getAttributeThe attribute pertaining to this instance.- Returns:
- the attribute
 
- 
getBaseValuedouble getBaseValue()Base value of this instance before modifiers are applied.- Returns:
- base value
 
- 
setBaseValuevoid setBaseValue(double value)Set the base value of this instance.- Parameters:
- value- new base value
 
- 
getModifiersGet all modifiers present on this instance.- Returns:
- a copied collection of all modifiers
 
- 
addModifierAdd a modifier to this instance.- Parameters:
- modifier- to add
 
- 
removeModifierRemove a modifier from this instance.- Parameters:
- modifier- to remove
 
- 
getValuedouble getValue()Get the value of this instance after all associated modifiers have been applied.- Returns:
- the total attribute value
 
- 
getDefaultValuedouble getDefaultValue()Gets the default value of the Attribute attached to this instance.- Returns:
- server default value
 
 
-