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 TypeMethodDescriptionvoid
Adds a buff to the buff collection.void
Adds a buff to the buff collection.void
Deprecated.void
Deprecated.Buff types are more abstract now, soaddBuff(String, Buff, int)
should be preferredvoid
addDamageBuff
(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)
insteadvoid
addDefenseBuff
(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)
insteadvoid
addSkillDamageBuff
(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)
insteadvoid
addSkillDefenseBuff
(Buff buff, int ticks) Deprecated.useaddBuff(BuffType, Buff, int)
insteaddouble
Applies all buffs of the given type to the specified valuedouble
Deprecated.useapply(String, double)
insteaddouble
Applies all buffs of the given type to the specified valuevoid
clear()
Clears all buffs on the entity and stops associated tasks.void
clearByType
(BuffType type) Clears buffs by the given typedouble
getFlatBonus
(BuffType buffType, String category) double
getMultiplier
(BuffType buffType, String category) boolean
double
modifyDealtDamage
(double damage) Deprecated.useapply(String, double)
insteaddouble
modifySkillDealtDamage
(double damage) Deprecated.useapply(String, double)
insteaddouble
modifySkillTakenDamage
(double damage) Deprecated.useapply(String, double)
insteaddouble
modifyTakenDamage
(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