All Implemented Interfaces:
DynamicStat<StatBonus>, TypedStat
Direct Known Subclasses:
BleedStat

public class SimpleStat extends DuplicableItemLoreStat<StatBonus> implements TypedStat, DynamicStat<StatBonus>
  • Field Details

  • Constructor Details

  • Method Details

    • getParameterClass

      @NotNull public Class<StatBonus> getParameterClass()
      Specified by:
      getParameterClass in class ItemLoreStat<StatBonus>
    • getTotal

      public double getTotal(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player, double def)
    • getTotal

      public double getTotal(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player)
    • get

      @NotNull public List<BiFunction<Boolean,Double,Double>> get(@NotNull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.entity.Player player)
    • getDefaultAttackSpeed

      public static double getDefaultAttackSpeed(@NotNull org.bukkit.inventory.ItemStack item, double def)
    • getDefaultAttackSpeed

      public static double getDefaultAttackSpeed(@NotNull org.bukkit.inventory.ItemStack item)
    • 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
    • formatValue

      @NotNull public String formatValue(@NotNull org.bukkit.inventory.ItemStack item, StatBonus statBonus)
      Specified by:
      formatValue in class ItemLoreStat<StatBonus>
    • updateItem

      @NotNull public org.bukkit.inventory.ItemStack updateItem(@Nullable org.bukkit.entity.Player p, @NotNull org.bukkit.inventory.ItemStack item)
      Specified by:
      updateItem in interface DynamicStat<StatBonus>
    • getFormat

      @NotNull public String getFormat(@Nullable org.bukkit.entity.Player p, @NotNull org.bukkit.inventory.ItemStack item, @NotNull StatBonus value)
      Specified by:
      getFormat in interface DynamicStat<StatBonus>