Package org.bukkit.block
Interface Jukebox
- All Superinterfaces:
BlockState
,Metadatable
public interface Jukebox extends BlockState
Represents a Jukebox
-
Method Summary
Modifier and Type Method Description boolean
eject()
Stop the jukebox playing and eject the current recordMaterial
getPlaying()
Get the record currently playingboolean
isPlaying()
Check if the jukebox is currently playing a recordvoid
setPlaying(Material record)
Set the record currently playingMethods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, update
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Method Details
-
getPlaying
Material getPlaying()Get the record currently playing- Returns:
- The record Material, or AIR if none is playing
-
setPlaying
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
-