001    package org.bukkit.block;
002    
003    import org.bukkit.Material;
004    
005    /**
006     * Represents a Jukebox
007     */
008    public interface Jukebox extends BlockState {
009        /**
010         * Get the record currently playing
011         *
012         * @return The record Material, or AIR if none is playing
013         */
014        public Material getPlaying();
015    
016        /**
017         * Set the record currently playing
018         *
019         * @param record The record Material, or null/AIR to stop playing
020         */
021        public void setPlaying(Material record);
022    
023        /**
024         * Check if the jukebox is currently playing a record
025         *
026         * @return True if there is a record playing
027         */
028        public boolean isPlaying();
029    
030        /**
031         * Stop the jukebox playing and eject the current record
032         *
033         * @return True if a record was ejected; false if there was none playing
034         */
035        public boolean eject();
036    }