public interface Jukebox extends BlockState
Modifier and Type | Method and 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, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, 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.
IllegalStateException
- if this block state is not placedCopyright © 2021. All rights reserved.