All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.skillw.pouvoir.util.attribute.AttributeUtils.kt Maven / Gradle / Ivy

There is a newer version: 1.6.7-beta-6
Show newest version
package com.skillw.pouvoir.util.attribute

import com.skillw.pouvoir.util.nms.NMS
import org.bukkit.attribute.AttributeInstance
import org.bukkit.entity.LivingEntity


fun LivingEntity.getAttribute(attribute: BukkitAttribute): AttributeInstance? {
    return NMS.INSTANCE.getAttribute(this, attribute)
}


fun AttributeInstance.clear() {
    for (modifier in this.modifiers) {
        this.removeModifier(modifier)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy