Interface Jukebox

All Superinterfaces:
BlockEntity, CopyableDataHolder, DataHolder, DataHolder.Mutable, DataSerializable, Locatable, SerializableDataHolder, SerializableDataHolder.Mutable, ValueContainer

public interface Jukebox extends BlockEntity
Represents a jukebox, also known as a music disc player.
  • Method Details

    • item

      Returns:
      A snapshot of the disc in the jukebox.
    • play

      void play()
      Attempts to play the currently stored music disc according to the Keys.ITEM_STACK_SNAPSHOT of this Jukebox.
    • stop

      void stop()
      Stops the currently playing music disc, if any.
    • eject

      void eject()
      Ejects the music disc item in this Jukebox into the world.
    • insert

      void insert(ItemStack disc)
      Ejects the current music disc item in this Jukebox and inserts the given one.
      Parameters:
      disc - The music disc item to insert