Package org.bukkit

Enum Instrument

java.lang.Object
java.lang.Enum<Instrument>
org.bukkit.Instrument
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Instrument>, java.lang.constant.Constable

public enum Instrument
extends java.lang.Enum<Instrument>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    BASS_DRUM
    Bass drum is normally played when a note block is on top of a stone-like block
    BASS_GUITAR
    Bass guitar is normally played when a note block is on top of a wooden block.
    PIANO
    Piano is the standard instrument for a note block.
    SNARE_DRUM
    Snare drum is normally played when a note block is on top of a sandy block.
    STICKS
    Sticks are normally played when a note block is on top of a glass block.
  • Method Summary

    Modifier and Type Method Description
    static Instrument getByType​(byte type)
    Deprecated.
    Magic value
    byte getType()
    Deprecated.
    Magic value
    static Instrument valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Instrument[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PIANO

      public static final Instrument PIANO
      Piano is the standard instrument for a note block.
    • BASS_DRUM

      public static final Instrument BASS_DRUM
      Bass drum is normally played when a note block is on top of a stone-like block
    • SNARE_DRUM

      public static final Instrument SNARE_DRUM
      Snare drum is normally played when a note block is on top of a sandy block.
    • STICKS

      public static final Instrument STICKS
      Sticks are normally played when a note block is on top of a glass block.
    • BASS_GUITAR

      public static final Instrument BASS_GUITAR
      Bass guitar is normally played when a note block is on top of a wooden block.
  • Method Details

    • values

      public static Instrument[] 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 Instrument valueOf​(java.lang.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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • getType

      @Deprecated public byte getType()
      Deprecated.
      Magic value
      Returns:
      The type ID of this instrument.
    • getByType

      @Deprecated public static Instrument getByType​(byte type)
      Deprecated.
      Magic value
      Get an instrument by its type ID.
      Parameters:
      type - The type ID
      Returns:
      The instrument