Class JukeboxMock
java.lang.Object
be.seeseemelk.mockbukkit.block.state.BlockStateMock
be.seeseemelk.mockbukkit.block.state.TileStateMock
be.seeseemelk.mockbukkit.block.state.JukeboxMock
- All Implemented Interfaces:
BlockState
,Jukebox
,TileState
,BlockInventoryHolder
,InventoryHolder
,Metadatable
,PersistentDataHolder
Mock implementation of a
Jukebox
.- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
JukeboxMock
(@NotNull JukeboxMock state) Constructs a newJukeboxMock
by cloning the data from an existing one.protected
JukeboxMock
(@NotNull Block block) Constructs a newJukeboxMock
for the providedBlock
.JukeboxMock
(@NotNull Material material) Constructs a newJukeboxMock
for the providedMaterial
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
eject()
@NotNull JukeboxInventory
@NotNull Material
@NotNull ItemStack
@NotNull BlockState
This returns a copy of thisBlockStateMock
.@NotNull JukeboxInventory
boolean
boolean
void
setPlaying
(@Nullable Material recordType) void
boolean
void
Methods inherited from class be.seeseemelk.mockbukkit.block.state.TileStateMock
getPersistentDataContainer, isSnapshot
Methods inherited from class be.seeseemelk.mockbukkit.block.state.BlockStateMock
checkType, checkType, checkType, checkType, copy, equals, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getMetadata, getRawData, getType, getWorld, getX, getY, getZ, hashCode, hasMetadata, isCollidable, isPlaced, mockState, removeMetadata, setBlockData, setData, setMetadata, setRawData, setType, update, update, update
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.inventory.BlockInventoryHolder
getBlock
Methods inherited from interface org.bukkit.block.BlockState
copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer, isSnapshot
-
Constructor Details
-
JukeboxMock
- Parameters:
material
- The material this state is for.
-
JukeboxMock
- Parameters:
block
- The block this state is for.
-
JukeboxMock
Constructs a newJukeboxMock
by cloning the data from an existing one.- Parameters:
state
- The state to clone.
-
-
Method Details
-
getSnapshot
Description copied from class:BlockStateMock
This returns a copy of thisBlockStateMock
. Inheritents of this class should override this method!- Specified by:
getSnapshot
in classTileStateMock
- Returns:
- A snapshot of this
BlockStateMock
.
-
getPlaying
- Specified by:
getPlaying
in interfaceJukebox
-
setPlaying
- Specified by:
setPlaying
in interfaceJukebox
-
hasRecord
public boolean hasRecord() -
getRecord
-
setRecord
-
isPlaying
public boolean isPlaying() -
startPlaying
public boolean startPlaying()- Specified by:
startPlaying
in interfaceJukebox
-
stopPlaying
public void stopPlaying()- Specified by:
stopPlaying
in interfaceJukebox
-
eject
public boolean eject() -
getInventory
- Specified by:
getInventory
in interfaceInventoryHolder
- Specified by:
getInventory
in interfaceJukebox
-
getSnapshotInventory
- Specified by:
getSnapshotInventory
in interfaceJukebox
-