java.lang.Object
studio.magemonkey.divinity.stats.items.api.ItemLoreStat<double[]>
studio.magemonkey.divinity.stats.items.attributes.stats.DurabilityStat
All Implemented Interfaces:
TypedStat

public class DurabilityStat extends ItemLoreStat<double[]> implements TypedStat
  • Constructor Details

    • DurabilityStat

      public DurabilityStat(@NotNull String name, @NotNull String format, double cap)
  • Method Details

    • getParameterClass

      @NotNull public Class<double[]> getParameterClass()
      Specified by:
      getParameterClass in class ItemLoreStat<double[]>
    • getType

      @NotNull public TypedStat.Type getType()
      Specified by:
      getType in interface TypedStat
    • getCapability

      public double getCapability()
      Specified by:
      getCapability in interface TypedStat
    • setCapability

      public void setCapability(double cap)
      Specified by:
      setCapability in interface TypedStat
    • getItemType

      @NotNull public SimpleStat.ItemType getItemType()
      Specified by:
      getItemType in interface TypedStat
    • isPercent

      public boolean isPercent()
      Specified by:
      isPercent in interface TypedStat
    • canBeNegative

      public boolean canBeNegative()
      Specified by:
      canBeNegative in interface TypedStat
    • isMainItem

      @Deprecated public boolean isMainItem(@NotNull org.bukkit.inventory.ItemStack item)
      Deprecated.
      Specified by:
      isMainItem in interface TypedStat
    • getDependStat

      @Nullable public TypedStat.Type getDependStat()
      Specified by:
      getDependStat in interface TypedStat
    • isUnbreakable

      public boolean isUnbreakable(@NotNull org.bukkit.inventory.ItemStack item)
    • isDamaged

      public boolean isDamaged(@NotNull org.bukkit.inventory.ItemStack item)
    • isBroken

      public boolean isBroken(@NotNull org.bukkit.inventory.ItemStack item)
    • reduceDurability

      public boolean reduceDurability(@NotNull org.bukkit.entity.LivingEntity li, @NotNull org.bukkit.inventory.ItemStack item, int amount)
    • formatValue

      @NotNull public String formatValue(@NotNull org.bukkit.inventory.ItemStack item, double[] values)
      Specified by:
      formatValue in class ItemLoreStat<double[]>