Package org.bukkit

Enum Art

All Implemented Interfaces:
Serializable, Comparable<Art>, Constable, Keyed

public enum Art
extends Enum<Art>
implements Keyed
Represents the art on a painting
  • Enum Constant Details

  • Method Details

    • values

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

      public static Art valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getBlockWidth

      public int getBlockWidth()
      Gets the width of the painting, in blocks
      Returns:
      The width of the painting, in blocks
    • getBlockHeight

      public int getBlockHeight()
      Gets the height of the painting, in blocks
      Returns:
      The height of the painting, in blocks
    • getId

      @Deprecated public int getId()
      Deprecated.
      Magic value
      Get the ID of this painting.
      Returns:
      The ID of this painting
    • getKey

      @NotNull public NamespacedKey getKey()
      Description copied from interface: Keyed
      Return the namespaced identifier for this object.
      Specified by:
      getKey in interface Keyed
      Returns:
      this object's key
    • getById

      @Deprecated @Nullable public static Art getById​(int id)
      Deprecated.
      Magic value
      Get a painting by its numeric ID
      Parameters:
      id - The ID
      Returns:
      The painting
    • getByName

      @Nullable public static Art getByName​(@NotNull String name)
      Get a painting by its unique name

      This ignores underscores and capitalization

      Parameters:
      name - The name
      Returns:
      The painting