Package com.sucy.skill.api.util
Class BuffData
java.lang.Object
com.sucy.skill.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.voidaddDamageBuff(Buff buff, int ticks) Deprecated.voidaddDefenseBuff(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 valuedoubleApplies all buffs of the given type to the specified valuevoidclear()Clears all buffs on the entity and stops associated tasks.doublegetFlatBonus(BuffType buffType, String category) doublegetMultiplier(BuffType buffType, String category) doublemodifyDealtDamage(double damage) Deprecated.useapply(BuffType, double)insteaddoublemodifySkillDealtDamage(double damage) Deprecated.useapply(BuffType, double)insteaddoublemodifySkillTakenDamage(double damage) Deprecated.useapply(BuffType, double)insteaddoublemodifyTakenDamage(double damage) Deprecated.useapply(BuffType, 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
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
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
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(BuffType, double)instead -
modifyTakenDamage
Deprecated.useapply(BuffType, double)instead -
modifySkillDealtDamage
Deprecated.useapply(BuffType, double)instead -
modifySkillTakenDamage
Deprecated.useapply(BuffType, double)instead -
clear
public void clear()Clears all buffs on the entity and stops associated tasks.
-
addBuff(BuffType, Buff, int)instead