Class CreatureSpawnerMock
java.lang.Object
be.seeseemelk.mockbukkit.block.state.BlockStateMock
be.seeseemelk.mockbukkit.block.state.TileStateMock
be.seeseemelk.mockbukkit.block.state.CreatureSpawnerMock
- All Implemented Interfaces:
BlockState
,CreatureSpawner
,TileState
,Metadatable
,PersistentDataHolder
Mock implementation of a
CreatureSpawner
.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CreatureSpawnerMock
(@NotNull CreatureSpawnerMock state) Constructs a newCreatureSpawnerMock
by cloning the data from an existing one.protected
CreatureSpawnerMock
(@NotNull Block block) Constructs a newCreatureSpawnerMock
for the providedBlock
.CreatureSpawnerMock
(@NotNull Material material) Constructs a newCreatureSpawnerMock
for the providedMaterial
. -
Method Summary
Modifier and TypeMethodDescription@NotNull String
int
getDelay()
int
int
int
int
@NotNull CreatureSpawnerMock
This returns a copy of thisBlockStateMock
.int
@NotNull EntityType
int
boolean
void
void
setCreatureTypeByName
(@NotNull String creatureType) void
setDelay
(int delay) void
setMaxNearbyEntities
(int maxNearbyEntities) void
setMaxSpawnDelay
(int delay) void
setMinSpawnDelay
(int delay) void
setRequiredPlayerRange
(int requiredPlayerRange) void
setSpawnCount
(int spawnCount) void
setSpawnedItem
(@NotNull ItemStack itemStack) void
setSpawnedType
(@NotNull EntityType creatureType) void
setSpawnRange
(int spawnRange) 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, 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.block.BlockState
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
-
CreatureSpawnerMock
- Parameters:
material
- The material this state is for.
-
CreatureSpawnerMock
- Parameters:
block
- The block this state is for.
-
CreatureSpawnerMock
Constructs a newCreatureSpawnerMock
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
.
-
getSpawnedType
- Specified by:
getSpawnedType
in interfaceCreatureSpawner
-
setSpawnedType
- Specified by:
setSpawnedType
in interfaceCreatureSpawner
-
setCreatureTypeByName
- Specified by:
setCreatureTypeByName
in interfaceCreatureSpawner
-
getCreatureTypeName
- Specified by:
getCreatureTypeName
in interfaceCreatureSpawner
-
getDelay
public int getDelay()- Specified by:
getDelay
in interfaceCreatureSpawner
-
setDelay
public void setDelay(int delay) - Specified by:
setDelay
in interfaceCreatureSpawner
-
getMinSpawnDelay
public int getMinSpawnDelay()- Specified by:
getMinSpawnDelay
in interfaceCreatureSpawner
-
setMinSpawnDelay
public void setMinSpawnDelay(int delay) - Specified by:
setMinSpawnDelay
in interfaceCreatureSpawner
-
getMaxSpawnDelay
public int getMaxSpawnDelay()- Specified by:
getMaxSpawnDelay
in interfaceCreatureSpawner
-
setMaxSpawnDelay
public void setMaxSpawnDelay(int delay) - Specified by:
setMaxSpawnDelay
in interfaceCreatureSpawner
-
getSpawnCount
public int getSpawnCount()- Specified by:
getSpawnCount
in interfaceCreatureSpawner
-
setSpawnCount
public void setSpawnCount(int spawnCount) - Specified by:
setSpawnCount
in interfaceCreatureSpawner
-
getMaxNearbyEntities
public int getMaxNearbyEntities()- Specified by:
getMaxNearbyEntities
in interfaceCreatureSpawner
-
setMaxNearbyEntities
public void setMaxNearbyEntities(int maxNearbyEntities) - Specified by:
setMaxNearbyEntities
in interfaceCreatureSpawner
-
getRequiredPlayerRange
public int getRequiredPlayerRange()- Specified by:
getRequiredPlayerRange
in interfaceCreatureSpawner
-
setRequiredPlayerRange
public void setRequiredPlayerRange(int requiredPlayerRange) - Specified by:
setRequiredPlayerRange
in interfaceCreatureSpawner
-
getSpawnRange
public int getSpawnRange()- Specified by:
getSpawnRange
in interfaceCreatureSpawner
-
setSpawnRange
public void setSpawnRange(int spawnRange) - Specified by:
setSpawnRange
in interfaceCreatureSpawner
-
isActivated
public boolean isActivated()- Specified by:
isActivated
in interfaceCreatureSpawner
-
resetTimer
public void resetTimer()- Specified by:
resetTimer
in interfaceCreatureSpawner
-
setSpawnedItem
- Specified by:
setSpawnedItem
in interfaceCreatureSpawner
-