Interface Jukebox

All Superinterfaces:
BlockState, Metadatable

public interface Jukebox
extends BlockState
Represents a Jukebox
  • Method Details

    • getPlaying

      Material getPlaying()
      Get the record currently playing
      Returns:
      The record Material, or AIR if none is playing
    • setPlaying

      void setPlaying​(Material record)
      Set the record currently playing
      Parameters:
      record - The record Material, or null/AIR to stop playing
    • isPlaying

      boolean isPlaying()
      Check if the jukebox is currently playing a record
      Returns:
      True if there is a record playing
    • eject

      boolean eject()
      Stop the jukebox playing and eject the current record
      Returns:
      True if a record was ejected; false if there was none playing