org.bukkit.attribute.Attributable Java Examples

The following examples show how to use org.bukkit.attribute.Attributable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AttributeUtils.java    From ProjectAres with GNU Affero General Public License v3.0 4 votes vote down vote up
public static void removeModifier(Attributable attributable, AttributeModifier modifier) {
    for(Attribute attribute : Attribute.values()) {
        final AttributeInstance instance = attributable.getAttribute(attribute);
        if(instance != null) instance.removeModifier(modifier);
    }
}
 
Example #2
Source File: AttributeUtils.java    From ProjectAres with GNU Affero General Public License v3.0 4 votes vote down vote up
public static void removeAllModifiers(Attributable attributable, Attribute attribute) {
    final AttributeInstance instance = attributable.getAttribute(attribute);
    if(instance != null) removeAllModifiers(instance);
}
 
Example #3
Source File: AttributeUtils.java    From ProjectAres with GNU Affero General Public License v3.0 4 votes vote down vote up
public static void removeAllModifiers(Attributable attributable) {
    for(Attribute attribute : Attribute.values()) removeAllModifiers(attributable, attribute);
}