Class EntityStats

java.lang.Object
studio.magemonkey.divinity.stats.EntityStats

public class EntityStats extends Object
  • Method Details

    • purge

      public static void purge(@NotNull org.bukkit.entity.LivingEntity entity)
    • getAll

      @NotNull public static Collection<EntityStats> getAll()
    • get

      @NotNull public static EntityStats get(@NotNull org.bukkit.entity.LivingEntity entity)
    • getEntityName

      @NotNull public static String getEntityName(@NotNull org.bukkit.entity.Entity entity)
    • getEntityMaxHealth

      public static double getEntityMaxHealth(@NotNull org.bukkit.entity.LivingEntity entity)
    • handleDeath

      public void handleDeath()
    • purge

      public void purge()
    • getLastDamageMeta

      @Nullable public DamageMeta getLastDamageMeta()
    • setLastDamageMeta

      public void setLastDamageMeta(@Nullable DamageMeta meta)
    • 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

      public void addEffect(@NotNull IEffect effect)
    • removeEffect

      public void removeEffect(@NotNull IEffect effect)
    • hasEffect

      public boolean hasEffect(@NotNull IEffectType type)
    • getEffectResist

      public double getEffectResist(@NotNull IEffectType type, boolean safe)
    • getActiveEffects

      @NotNull public Set<IEffect> getActiveEffects(boolean update)
      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

      @NotNull public Set<org.bukkit.potion.PotionEffect> 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

      @NotNull public List<org.bukkit.inventory.ItemStack> getArmor()
    • getEquipment

      @NotNull public List<org.bukkit.inventory.ItemStack> getEquipment()
    • updateAll

      public void updateAll()
    • getBonuses

      @NotNull public List<BiFunction<Boolean,Double,Double>> getBonuses(@NotNull ItemLoreStat<?> stat)
    • setArrowBonus

      public void setArrowBonus(@Nullable ArrowManager.QArrow arrow, int level)
    • getDamage

      public double getDamage()
    • getDamageByType

      public double getDamageByType(@NotNull DamageAttribute type)
    • getDefenseByType

      public double getDefenseByType(@NotNull DefenseAttribute type)
    • getDamageTypes

      @NotNull public Map<DamageAttribute,Double> getDamageTypes(boolean safe)
    • getDefenseTypes

      @NotNull public Map<DefenseAttribute,Double> getDefenseTypes(boolean safe)
    • getItemStats

      public Map<TypedStat.Type,Double> getItemStats(boolean safe)
    • getItemStat

      public double getItemStat(@NotNull TypedStat.Type type, boolean safe)
    • getEnchantProtectFactor

      public double getEnchantProtectFactor(@NotNull org.bukkit.enchantments.Enchantment en)