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:
org.bukkit.block.BlockState,org.bukkit.block.CreatureSpawner,org.bukkit.block.TileState,org.bukkit.metadata.Metadatable,org.bukkit.persistence.PersistentDataHolder
Mock implementation of a
CreatureSpawner.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreatureSpawnerMock(@NotNull CreatureSpawnerMock state) Constructs a newCreatureSpawnerMockby cloning the data from an existing one.CreatureSpawnerMock(@NotNull org.bukkit.Material material) Constructs a newCreatureSpawnerMockfor the providedMaterial.protectedCreatureSpawnerMock(@NotNull org.bukkit.block.Block block) Constructs a newCreatureSpawnerMockfor the providedBlock. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPotentialSpawn(@NotNull org.bukkit.block.spawner.SpawnerEntry spawnerEntry) voidaddPotentialSpawn(@NotNull org.bukkit.entity.EntitySnapshot snapshot, int weight, @Nullable org.bukkit.block.spawner.SpawnRule spawnRule) @NotNull StringintgetDelay()intintint@NotNull List<org.bukkit.block.spawner.SpawnerEntry> int@NotNull CreatureSpawnerMockThis returns a copy of thisBlockStateMock.int@Nullable org.bukkit.entity.EntitySnapshot@NotNull org.bukkit.entity.EntityTypeintbooleanvoidvoidsetCreatureTypeByName(@NotNull String creatureType) voidsetDelay(int delay) voidsetMaxNearbyEntities(int maxNearbyEntities) voidsetMaxSpawnDelay(int delay) voidsetMinSpawnDelay(int delay) voidsetPotentialSpawns(@NotNull Collection<org.bukkit.block.spawner.SpawnerEntry> entries) voidsetRequiredPlayerRange(int requiredPlayerRange) voidsetSpawnCount(int spawnCount) voidsetSpawnedEntity(@NotNull org.bukkit.entity.EntitySnapshot snapshot) voidsetSpawnedItem(@NotNull org.bukkit.inventory.ItemStack itemStack) voidsetSpawnedType(@NotNull org.bukkit.entity.EntityType creatureType) voidsetSpawnRange(int spawnRange) Methods inherited from class be.seeseemelk.mockbukkit.block.state.TileStateMock
getPersistentDataContainer, isSnapshotMethods inherited from class be.seeseemelk.mockbukkit.block.state.BlockStateMock
checkType, checkType, checkType, checkType, copy, 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, updateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.block.BlockState
copy, 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, updateMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer, isSnapshot
-
Constructor Details
-
CreatureSpawnerMock
public CreatureSpawnerMock(@NotNull @NotNull org.bukkit.Material material) - Parameters:
material- The material this state is for.
-
CreatureSpawnerMock
protected CreatureSpawnerMock(@NotNull @NotNull org.bukkit.block.Block block) - Parameters:
block- The block this state is for.
-
CreatureSpawnerMock
Constructs a newCreatureSpawnerMockby cloning the data from an existing one.- Parameters:
state- The state to clone.
-
-
Method Details
-
getSnapshot
Description copied from class:BlockStateMockThis returns a copy of thisBlockStateMock. Inheritents of this class should override this method!- Specified by:
getSnapshotin classTileStateMock- Returns:
- A snapshot of this
BlockStateMock.
-
getSpawnedType
@NotNull public @NotNull org.bukkit.entity.EntityType getSpawnedType()- Specified by:
getSpawnedTypein interfaceorg.bukkit.block.CreatureSpawner
-
setSpawnedType
public void setSpawnedType(@NotNull @NotNull org.bukkit.entity.EntityType creatureType) - Specified by:
setSpawnedTypein interfaceorg.bukkit.block.CreatureSpawner
-
setCreatureTypeByName
- Specified by:
setCreatureTypeByNamein interfaceorg.bukkit.block.CreatureSpawner
-
getCreatureTypeName
- Specified by:
getCreatureTypeNamein interfaceorg.bukkit.block.CreatureSpawner
-
getDelay
public int getDelay()- Specified by:
getDelayin interfaceorg.bukkit.block.CreatureSpawner
-
setDelay
public void setDelay(int delay) - Specified by:
setDelayin interfaceorg.bukkit.block.CreatureSpawner
-
getMinSpawnDelay
public int getMinSpawnDelay()- Specified by:
getMinSpawnDelayin interfaceorg.bukkit.block.CreatureSpawner
-
setMinSpawnDelay
public void setMinSpawnDelay(int delay) - Specified by:
setMinSpawnDelayin interfaceorg.bukkit.block.CreatureSpawner
-
getMaxSpawnDelay
public int getMaxSpawnDelay()- Specified by:
getMaxSpawnDelayin interfaceorg.bukkit.block.CreatureSpawner
-
setMaxSpawnDelay
public void setMaxSpawnDelay(int delay) - Specified by:
setMaxSpawnDelayin interfaceorg.bukkit.block.CreatureSpawner
-
getSpawnCount
public int getSpawnCount()- Specified by:
getSpawnCountin interfaceorg.bukkit.block.CreatureSpawner
-
setSpawnCount
public void setSpawnCount(int spawnCount) - Specified by:
setSpawnCountin interfaceorg.bukkit.block.CreatureSpawner
-
getMaxNearbyEntities
public int getMaxNearbyEntities()- Specified by:
getMaxNearbyEntitiesin interfaceorg.bukkit.block.CreatureSpawner
-
setMaxNearbyEntities
public void setMaxNearbyEntities(int maxNearbyEntities) - Specified by:
setMaxNearbyEntitiesin interfaceorg.bukkit.block.CreatureSpawner
-
getRequiredPlayerRange
public int getRequiredPlayerRange()- Specified by:
getRequiredPlayerRangein interfaceorg.bukkit.block.CreatureSpawner
-
setRequiredPlayerRange
public void setRequiredPlayerRange(int requiredPlayerRange) - Specified by:
setRequiredPlayerRangein interfaceorg.bukkit.block.CreatureSpawner
-
getSpawnRange
public int getSpawnRange()- Specified by:
getSpawnRangein interfaceorg.bukkit.block.CreatureSpawner
-
setSpawnRange
public void setSpawnRange(int spawnRange) - Specified by:
setSpawnRangein interfaceorg.bukkit.block.CreatureSpawner
-
getPotentialSpawns
- Specified by:
getPotentialSpawnsin interfaceorg.bukkit.block.CreatureSpawner
-
setPotentialSpawns
public void setPotentialSpawns(@NotNull @NotNull Collection<org.bukkit.block.spawner.SpawnerEntry> entries) - Specified by:
setPotentialSpawnsin interfaceorg.bukkit.block.CreatureSpawner
-
addPotentialSpawn
public void addPotentialSpawn(@NotNull @NotNull org.bukkit.block.spawner.SpawnerEntry spawnerEntry) - Specified by:
addPotentialSpawnin interfaceorg.bukkit.block.CreatureSpawner
-
addPotentialSpawn
public void addPotentialSpawn(@NotNull @NotNull org.bukkit.entity.EntitySnapshot snapshot, int weight, @Nullable @Nullable org.bukkit.block.spawner.SpawnRule spawnRule) - Specified by:
addPotentialSpawnin interfaceorg.bukkit.block.CreatureSpawner
-
setSpawnedEntity
public void setSpawnedEntity(@NotNull @NotNull org.bukkit.entity.EntitySnapshot snapshot) - Specified by:
setSpawnedEntityin interfaceorg.bukkit.block.CreatureSpawner
-
getSpawnedEntity
@Nullable public @Nullable org.bukkit.entity.EntitySnapshot getSpawnedEntity()- Specified by:
getSpawnedEntityin interfaceorg.bukkit.block.CreatureSpawner
-
isActivated
public boolean isActivated()- Specified by:
isActivatedin interfaceorg.bukkit.block.CreatureSpawner
-
resetTimer
public void resetTimer()- Specified by:
resetTimerin interfaceorg.bukkit.block.CreatureSpawner
-
setSpawnedItem
public void setSpawnedItem(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) - Specified by:
setSpawnedItemin interfaceorg.bukkit.block.CreatureSpawner
-