Class ItemStats

java.lang.Object
studio.magemonkey.divinity.stats.items.ItemStats

public class ItemStats extends Object
  • Constructor Details

    • ItemStats

      public ItemStats()
  • Method Details

    • clear

      public static void clear()
    • registerDamage

      public static void registerDamage(@NotNull DamageAttribute dmg)
    • registerDefense

      public static void registerDefense(@NotNull DefenseAttribute def)
    • registerStat

      public static void registerStat(@NotNull TypedStat stat)
    • registerAmmo

      public static void registerAmmo(@NotNull AmmoAttribute ammo)
    • registerHand

      public static void registerHand(@NotNull HandAttribute hand)
    • registerDynamicStat

      public static void registerDynamicStat(@NotNull DynamicStat stat)
    • getDynamicStats

      public static Collection<DynamicStat> getDynamicStats()
    • getDamages

      @NotNull public static Collection<DamageAttribute> getDamages()
    • getDamageById

      @Nullable public static DamageAttribute getDamageById(@NotNull String id)
    • getDamageByCause

      @Nullable public static DamageAttribute getDamageByCause(@NotNull org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
    • getDamageByDefault

      @NotNull public static DamageAttribute getDamageByDefault()
    • hasDamage

      public static boolean hasDamage(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player)
    • hasDamage

      public static boolean hasDamage(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull String id)
    • hasDamage

      public static boolean hasDamage(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull DamageAttribute dmgType)
    • getDamageMinOrMax

      public static double getDamageMinOrMax(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull String id, int index)
    • getDefenses

      @NotNull public static Collection<DefenseAttribute> getDefenses()
    • getDefenseById

      @Nullable public static DefenseAttribute getDefenseById(@NotNull String id)
    • hasDefense

      public static boolean hasDefense(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull String id)
    • hasDefense

      public static boolean hasDefense(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull DefenseAttribute defType)
    • getDefenseByDefault

      @Nullable public static DefenseAttribute getDefenseByDefault()
    • getDefense

      public static double getDefense(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull String id)
    • getStats

      @NotNull public static Collection<TypedStat> getStats()
    • getStat

      @Nullable public static TypedStat getStat(@NotNull TypedStat.Type type)
    • getStat

      public static double getStat(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull TypedStat.Type type)
    • getStat

      public static double getStat(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull TypedStat.Type type, double def)
    • getStat

      @Nullable public static <T extends TypedStat> T getStat(@NotNull Class<T> clazz)
    • hasStat

      public static boolean hasStat(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, @NotNull TypedStat.Type type)
    • updateVanillaAttributes

      public static void updateVanillaAttributes(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player)
    • getAmmos

      @NotNull public static Collection<AmmoAttribute> getAmmos()
    • getAmmo

      @Nullable public static AmmoAttribute getAmmo(@NotNull AmmoAttribute.Type type)
    • getAmmo

      @Nullable public static AmmoAttribute getAmmo(@NotNull org.bukkit.inventory.ItemStack item)
    • getHands

      @NotNull public static Collection<HandAttribute> getHands()
    • getHand

      @Nullable public static HandAttribute getHand(@NotNull HandAttribute.Type type)
    • getHand

      @Nullable public static HandAttribute getHand(@NotNull org.bukkit.inventory.ItemStack item)
    • registerAttribute

      public static void registerAttribute(@NotNull ItemLoreStat<?> att)
    • getAttributes

      @NotNull public static Collection<ItemLoreStat<?>> getAttributes()
    • getAttribute

      @Nullable public static ItemLoreStat<?> getAttribute(@NotNull String id)
    • getAttribute

      @Nullable public static <T extends ItemLoreStat<?>> T getAttribute(@NotNull Class<T> clazz)
    • registerSocket

      public static void registerSocket(@NotNull SocketAttribute socket)
    • getSocket

      @Nullable public static SocketAttribute getSocket(@NotNull SocketAttribute.Type type, @NotNull String id)
    • getSockets

      @NotNull public static Collection<SocketAttribute> getSockets(@NotNull SocketAttribute.Type type)
    • setId

      public static void setId(@NotNull org.bukkit.inventory.ItemStack item, @NotNull String id)
    • getId

      @Nullable public static String getId(@NotNull org.bukkit.inventory.ItemStack item)
    • setLevel

      public static void setLevel(@NotNull org.bukkit.inventory.ItemStack item, int lvl)
    • getLevel

      public static int getLevel(@NotNull org.bukkit.inventory.ItemStack item)
    • setModule

      public static void setModule(@NotNull org.bukkit.inventory.ItemStack item, @NotNull String mod)
    • getModule

      @Nullable public static QModuleDrop<?> getModule(@NotNull org.bukkit.inventory.ItemStack item)
    • setSocketRate

      public static void setSocketRate(@NotNull org.bukkit.inventory.ItemStack item, int rate)
    • getSocketRate

      public static int getSocketRate(@NotNull org.bukkit.inventory.ItemStack item)