org.bukkit.block
Interface Jukebox

All Superinterfaces:
BlockState, Metadatable

public interface Jukebox
extends BlockState

Represents a Jukebox


Method Summary
 boolean eject()
          Stop the jukebox playing and eject the current record
 Material getPlaying()
          Get the record currently playing
 boolean isPlaying()
          Check if the jukebox is currently playing a record
 void setPlaying(Material record)
          Set the record currently playing
 
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, setData, setRawData, setType, setTypeId, update, update, update
 
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
 

Method Detail

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


Copyright © 2014. All rights reserved.