Enum Class Enchantment

java.lang.Object
java.lang.Enum<Enchantment>
eu.sculkpowered.server.enchantment.Enchantment
All Implemented Interfaces:
Registry.Entry, Serializable, Comparable<Enchantment>, Constable, Keyed

@Experimental public enum Enchantment extends Enum<Enchantment> implements Registry.Entry
An enum of all enchantments supported.
  • Enum Constant Details

    • EFFICIENCY

      public static final Enchantment EFFICIENCY
  • Method Details

    • values

      public static Enchantment[] 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 Enchantment 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
    • key

      @NotNull public @NotNull Key key()
      Specified by:
      key in interface Keyed
    • id

      public int id()
      Description copied from interface: Registry.Entry
      Gets the id of the entry
      Specified by:
      id in interface Registry.Entry
      Returns:
      the id of the entry
    • asNBT

      @NotNull public @NotNull CompoundBinaryTag asNBT()
      Description copied from interface: Registry.Entry
      Gets the entry as a CompoundBinaryTag.
      Specified by:
      asNBT in interface Registry.Entry
      Returns:
      the entry as a CompoundBinaryTag