Class BuffData
java.lang.Object
studio.magemonkey.fabled.api.util.BuffData
Represents buffs set on an entity
-
Constructor Summary
ConstructorsConstructorDescriptionBuffData(org.bukkit.entity.LivingEntity entity) Initializes new buff data for the entity -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a buff to the buff collection.voidAdds a buff to the buff collection.voidDeprecated.voidDeprecated.Buff types are more abstract now, soaddBuff(String, Buff, int)should be preferredvoidaddDamageBuff(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)insteadvoidaddDefenseBuff(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)insteadvoidaddSkillDamageBuff(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)insteadvoidaddSkillDefenseBuff(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)insteaddoubleApplies all buffs of the given type to the specified valuedoubleDeprecated.useapply(String, double)insteaddoubleApplies all buffs of the given type to the specified valuevoidclear()Clears all buffs on the entity and stops associated tasks.voidclearByType(BuffType type) Clears buffs by the given typedoublegetFlatBonus(BuffType buffType, String category) doublegetMultiplier(BuffType buffType, String category) booleandoublemodifyDealtDamage(double damage) Deprecated.useapply(String, double)insteaddoublemodifySkillDealtDamage(double damage) Deprecated.useapply(String, double)insteaddoublemodifySkillTakenDamage(double damage) Deprecated.useapply(String, double)insteaddoublemodifyTakenDamage(double damage) Deprecated.useapply(String, double)instead
-
Constructor Details
-
BuffData
public BuffData(org.bukkit.entity.LivingEntity entity) Initializes new buff data for the entity- Parameters:
entity- entity to initialize for
-
-
Method Details
-
getMultiplier
-
getFlatBonus
-
addBuff
Deprecated.Buff types are more abstract now, soaddBuff(String, Buff, int)should be preferredAdds a buff to the buff collection. If a buff already exists with the same key, it will be overwritten.- Parameters:
type- type of buff to addbuff- buff detailsticks- how long to apply the buff for
-
addBuff
Adds a buff to the buff collection. If a buff already exists with the same key, it will be overwritten.- Parameters:
type- type of buff to addbuff- buff detailsticks- how long to apply the buff for
-
addBuff
Deprecated.Buff types are more abstract now, soaddBuff(String, Buff, int)should be preferredAdds a buff to the buff collection. If a buff already exists with the same key, it will be overwritten.- Parameters:
type- type of buff to addcategory- sub category of the type to apply (e.g. damage classification)buff- buff detailsticks- how long to apply the buff for
-
addBuff
Adds a buff to the buff collection. If a buff already exists with the same key, it will be overwritten.- Parameters:
type- type of buff to addcategory- sub category of the type to apply (e.g. damage classification)buff- buff detailsticks- how long to apply the buff for
-
addDamageBuff
Deprecated.useaddBuff(BuffType, Buff, int)instead -
addDefenseBuff
Deprecated.useaddBuff(BuffType, Buff, int)instead -
addSkillDamageBuff
Deprecated.useaddBuff(BuffType, Buff, int)instead -
addSkillDefenseBuff
Deprecated.useaddBuff(BuffType, Buff, int)instead -
apply
Applies all buffs of the given type to the specified value- Parameters:
type- type of buff to applyvalue- value to modify- Returns:
- value after all buff applications
-
apply
Deprecated.useapply(String, double)insteadApplies all buffs of the given type to the specified value- Parameters:
type- type of buff to applyvalue- value to modify- Returns:
- value after all buff applications
-
isActive
-
clearByType
Clears buffs by the given type- Parameters:
type- type of buff
-
apply
Applies all buffs of the given type to the specified value- Parameters:
type- type of buff to applycategory- sub category of the buff type to apply (e.g. damage classification)value- value to modify- Returns:
- value after all buff applications
-
modifyDealtDamage
Deprecated.useapply(String, double)instead -
modifyTakenDamage
Deprecated.useapply(String, double)instead -
modifySkillDealtDamage
Deprecated.useapply(String, double)instead -
modifySkillTakenDamage
Deprecated.useapply(String, double)instead -
clear
public void clear()Clears all buffs on the entity and stops associated tasks.
-
addBuff(String, Buff, int)should be preferred