Enum Class Units

java.lang.Object
java.lang.Enum<Units>
net.darkhax.bookshelf.common.api.text.unit.Units
All Implemented Interfaces:
Serializable, Comparable<Units>, Constable, IUnit

public enum Units extends Enum<Units> implements IUnit
Represents various units that can be displayed in game.
  • Enum Constant Details

    • TICK

      public static final Units TICK
    • NANOSECOND

      public static final Units NANOSECOND
    • MILLISECOND

      public static final Units MILLISECOND
    • SECOND

      public static final Units SECOND
    • MINUTE

      public static final Units MINUTE
    • HOUR

      public static final Units HOUR
    • DAY

      public static final Units DAY
    • WEEK

      public static final Units WEEK
    • MONTH

      public static final Units MONTH
    • YEAR

      public static final Units YEAR
  • Method Details

    • values

      public static Units[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Units valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • unitKey

      public net.minecraft.resources.ResourceLocation unitKey()
      Description copied from interface: IUnit
      A namespaced identifier that is used to derive localization keys for the unit.
      Specified by:
      unitKey in interface IUnit
      Returns:
      The namespace ID for the unit.