Interface EnchantmentDefinition.Cost

Enclosing interface:
EnchantmentDefinition

@NonExtendable public static interface EnchantmentDefinition.Cost
An enchanting cost depending on the level, equal to base + perLevelAboveFirst * (level - 1).
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    at(int level)
    Returns the cost at level.
    int
    Returns the cost at level 1.
    int
    Returns the cost added by each level above the first.
  • Method Details

    • base

      int base()
      Returns the cost at level 1.
      Returns:
      the cost at level 1
      Since:
      0.1.0
    • perLevelAboveFirst

      int perLevelAboveFirst()
      Returns the cost added by each level above the first.
      Returns:
      the cost added by each level above the first
      Since:
      0.1.0
    • at

      default int at(int level)
      Returns the cost at level.
      Parameters:
      level - the level, starting at 1
      Returns:
      the cost at level
      Since:
      0.1.0