Class BuffManager
java.lang.Object
studio.magemonkey.fabled.api.util.BuffManager
- All Implemented Interfaces:
studio.magemonkey.codex.registry.provider.BuffProvider
public class BuffManager
extends Object
implements studio.magemonkey.codex.registry.provider.BuffProvider
The manager for temporary entity buff data
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addBuff
(org.bukkit.entity.LivingEntity entity, BuffType type, String category, Buff buff, int ticks) Adds an offensive buff to the entitystatic void
Adds an offensive buff to the entitystatic void
addDamageBuff
(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.static void
addDefenseBuff
(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.useaddBuff(LivingEntity, BuffType, Buff, int)
insteadstatic void
addSkillDamageBuff
(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.useaddBuff(LivingEntity, BuffType, Buff, int)
insteadstatic void
addSkillDefenseBuff
(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.useaddBuff(LivingEntity, BuffType, Buff, int)
insteadstatic double
Deprecated, for removal: This API element is subject to removal in a future version.useBuffRegistry.scaleValue(String, LivingEntity, double)
insteadstatic double
Deprecated, for removal: This API element is subject to removal in a future version.useBuffRegistry.scaleValue(String, LivingEntity, double)
insteadstatic void
clearData
(org.bukkit.entity.LivingEntity entity) Clears the buffs for an entitystatic BuffData
getBuffData
(org.bukkit.entity.LivingEntity entity) Retrieves the buff data for an entity.static BuffData
getBuffData
(org.bukkit.entity.LivingEntity entity, boolean create) Retrieves the buff data for an entity, optionally creating new data if none currently exists.getData()
static BuffManager
static double
modifyDealtDamage
(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
insteadstatic double
modifySkillDealtDamage
(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
insteadstatic double
modifySkillTakenDefense
(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
insteadstatic double
modifyTakenDefense
(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
insteaddouble
scaleValue
(String name, org.bukkit.entity.LivingEntity player, double value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface studio.magemonkey.codex.registry.provider.BuffProvider
scaleDamageForDefense
-
Constructor Details
-
BuffManager
public BuffManager()
-
-
Method Details
-
getInstance
-
getBuffData
Retrieves the buff data for an entity. This returns null if no existing data is found.- Parameters:
entity
- entity to retrieve the data for- Returns:
- the buff data for the entity
-
getBuffData
Retrieves the buff data for an entity, optionally creating new data if none currently exists. If set to false, this will return null if no data currently exists.- Parameters:
entity
- entity to get the buff data forcreate
- whether to create new data if it doesn't exist- Returns:
- the buff data for an enemy
-
clearData
public static void clearData(org.bukkit.entity.LivingEntity entity) Clears the buffs for an entity- Parameters:
entity
- entity to clear the buffs for
-
addBuff
public static void addBuff(org.bukkit.entity.LivingEntity entity, BuffType type, Buff buff, int ticks) Adds an offensive buff to the entity- Parameters:
entity
- entity to give the buff totype
- type of buff to addbuff
- buff to addticks
- ticks to apply the buff for
-
addBuff
public static void addBuff(org.bukkit.entity.LivingEntity entity, BuffType type, String category, Buff buff, int ticks) Adds an offensive buff to the entity- Parameters:
entity
- entity to give the buff totype
- type of buff to addcategory
- sub category of the buff to addbuff
- buff to addticks
- ticks to apply the buff for
-
addDamageBuff
@Deprecated public static void addDamageBuff(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.useaddBuff(LivingEntity, BuffType, Buff, int)
instead -
addDefenseBuff
@Deprecated public static void addDefenseBuff(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.useaddBuff(LivingEntity, BuffType, Buff, int)
instead -
addSkillDamageBuff
@Deprecated public static void addSkillDamageBuff(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.useaddBuff(LivingEntity, BuffType, Buff, int)
instead -
addSkillDefenseBuff
@Deprecated public static void addSkillDefenseBuff(org.bukkit.entity.LivingEntity entity, Buff buff, int ticks) Deprecated.useaddBuff(LivingEntity, BuffType, Buff, int)
instead -
apply
@Deprecated(forRemoval=true, since="1.0.4-R0.16-SNAPSHOT") public static double apply(org.bukkit.entity.LivingEntity entity, BuffType type, double amount) Deprecated, for removal: This API element is subject to removal in a future version.useBuffRegistry.scaleValue(String, LivingEntity, double)
insteadModifies the amount of dealt damage using damage buff multipliers and bonuses.- Parameters:
entity
- entity to use the data oftype
- type of buffs to applyamount
- base amount to modify- Returns:
- modified number
-
apply
@Deprecated(forRemoval=true, since="1.0.4-R0.16-SNAPSHOT") public static double apply(org.bukkit.entity.LivingEntity entity, BuffType type, String category, double amount) Deprecated, for removal: This API element is subject to removal in a future version.useBuffRegistry.scaleValue(String, LivingEntity, double)
insteadModifies the amount of dealt damage using damage buff multipliers and bonuses.- Parameters:
entity
- entity to use the data oftype
- type of buffs to applycategory
- sub category of the buffs to applyamount
- base amount to modify- Returns:
- modified number
-
scaleValue
- Specified by:
scaleValue
in interfacestudio.magemonkey.codex.registry.provider.BuffProvider
-
modifyDealtDamage
@Deprecated public static double modifyDealtDamage(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
instead -
modifyTakenDefense
@Deprecated public static double modifyTakenDefense(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
instead -
modifySkillDealtDamage
@Deprecated public static double modifySkillDealtDamage(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
instead -
modifySkillTakenDefense
@Deprecated public static double modifySkillTakenDefense(org.bukkit.entity.LivingEntity entity, double damage) Deprecated.useapply(LivingEntity, BuffType, double)
instead -
getData
-
addBuff(LivingEntity, BuffType, Buff, int)
instead