BlockState
, Metadatable
public interface Jukebox extends BlockState
Modifier and Type | Method | Description |
---|---|---|
boolean |
eject() |
Stops the jukebox playing and ejects the current record.
|
Material |
getPlaying() |
Gets the record being played.
|
boolean |
isPlaying() |
Checks if the jukebox is playing a record.
|
void |
setPlaying(Material record) |
Sets the record being played.
|
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
Material getPlaying()
void setPlaying(Material record)
record
- The record Material, or null/AIR to stop playingboolean isPlaying()
boolean eject()
If the block represented by this state is no longer a jukebox, this will do nothing and return false.
java.lang.IllegalStateException
- if this block state is not placedCopyright © 2018. All rights reserved.