Package studio.magemonkey.divinity.stats
Class EntityStats
java.lang.Object
studio.magemonkey.divinity.stats.EntityStats
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddPermaPotionEffect(org.bukkit.potion.PotionEffect effect) static EntityStatsget(org.bukkit.entity.LivingEntity entity) getActiveEffects(boolean update) Gets all active effects for the entity.static Collection<EntityStats> getAll()List<org.bukkit.inventory.ItemStack> getArmor()doubledoublegetBonuses(ItemLoreStat<?> stat) doubledoublegetDamageTypes(boolean safe) doublegetDefenseTypes(boolean safe) doublegetEffectResist(IEffectType type, boolean safe) doublegetEnchantProtectFactor(org.bukkit.enchantments.Enchantment en) static doublegetEntityMaxHealth(org.bukkit.entity.LivingEntity entity) static StringgetEntityName(org.bukkit.entity.Entity entity) List<org.bukkit.inventory.ItemStack> org.bukkit.inventory.ItemStackorg.bukkit.inventory.ItemStackdoublegetItemStat(TypedStat.Type type, boolean safe) getItemStats(boolean safe) Set<org.bukkit.potion.PotionEffect> voidbooleanhasEffect(IEffectType type) booleanfinal booleanisNPC()final booleanisPlayer()voidpurge()static voidpurge(org.bukkit.entity.LivingEntity entity) voidremoveEffect(IEffect effect) voidremovePermaPotionEffect(org.bukkit.potion.PotionEffectType key) voidsetArrowBonus(ArrowManager.QArrow arrow, int level) voidsetAttackPower(double modifier) voidsetIgnoreAOE(boolean aoeIgnore) voidsetLastDamageMeta(DamageMeta meta) voidvoidvoidvoidvoid
-
Method Details
-
purge
public static void purge(@NotNull org.bukkit.entity.LivingEntity entity) -
getAll
-
get
-
getEntityName
-
getEntityMaxHealth
public static double getEntityMaxHealth(@NotNull org.bukkit.entity.LivingEntity entity) -
handleDeath
public void handleDeath() -
purge
public void purge() -
getLastDamageMeta
-
setLastDamageMeta
-
isPlayer
public final boolean isPlayer() -
isNPC
public final boolean isNPC() -
getAttackPower
public double getAttackPower() -
setAttackPower
public void setAttackPower(double modifier) -
getAttackPowerModifier
public double getAttackPowerModifier() -
updateAttackPower
public void updateAttackPower() -
isIgnoreAOE
public boolean isIgnoreAOE() -
setIgnoreAOE
public void setIgnoreAOE(boolean aoeIgnore) -
addEffect
-
removeEffect
-
hasEffect
-
getEffectResist
-
getActiveEffects
Gets all active effects for the entity. Optionally updates the bonus attributes- Parameters:
update- If true, the bonus attributes will be updated. Care should be taken to avoid infinite loops- Returns:
- A set of active effects
-
triggerEffects
public void triggerEffects() -
triggerVisualEffects
public void triggerVisualEffects() -
triggerPotionEffects
public void triggerPotionEffects() -
getPermaPotionEffects
-
addPermaPotionEffect
public void addPermaPotionEffect(@NotNull org.bukkit.potion.PotionEffect effect) -
removePermaPotionEffect
public void removePermaPotionEffect(@NotNull org.bukkit.potion.PotionEffectType key) -
getItemInMainHand
@NotNull public org.bukkit.inventory.ItemStack getItemInMainHand() -
getItemInOffHand
@NotNull public org.bukkit.inventory.ItemStack getItemInOffHand() -
getArmor
-
getEquipment
-
updateAll
public void updateAll() -
getBonuses
-
setArrowBonus
-
getDamage
public double getDamage() -
getDamageByType
-
getDefenseByType
-
getDamageTypes
-
getDefenseTypes
-
getItemStats
-
getItemStat
-
getEnchantProtectFactor
public double getEnchantProtectFactor(@NotNull org.bukkit.enchantments.Enchantment en)
-