Package org.bukkit.block
Interface TrialSpawner
- All Superinterfaces:
- BlockState,- Metadatable,- PersistentDataHolder,- TileState
Represents a captured state of a trial spawner.
- 
Method SummaryModifier and TypeMethodDescriptionintGets the length in ticks the spawner will stay in cooldown for.Gets theTrialSpawnerConfigurationused whenisOminous()is false.Gets theTrialSpawnerConfigurationused whenisOminous()is true.intGet the maximum distance a player can be in order for this spawner to be active.Gets a list of entities this spawner is currently tracking.Gets the players this spawner is currently tracking.booleanChecks if this spawner is using the ominousTrialSpawnerConfiguration.booleanisTrackingEntity(Entity entity) Checks if this spawner is currently tracking the provided entity.booleanisTrackingPlayer(Player player) Checks if this spawner is currently tracking the provided player.voidsetCooldownLength(int ticks) Sets the length in ticks the spawner will stay in cooldown for.voidsetOminous(boolean ominous) Changes this spawner between the normal and ominousTrialSpawnerConfiguration.voidsetRequiredPlayerRange(int requiredPlayerRange) Set the maximum distance a player can be in order for this spawner to be active.voidstartTrackingEntity(Entity entity) Force this spawner to start tracking the provided entity.voidstartTrackingPlayer(Player player) Force this spawner to start tracking the provided player.voidstopTrackingEntity(Entity entity) Force this spawner to stop tracking the provided entity.voidstopTrackingPlayer(Player player) Force this spawner to stop tracking the provided player.Methods inherited from interface org.bukkit.block.BlockStatecopy, copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.block.TileStategetPersistentDataContainer
- 
Method Details- 
getCooldownLengthint getCooldownLength()Gets the length in ticks the spawner will stay in cooldown for.- Returns:
- the number of ticks
 
- 
setCooldownLengthvoid setCooldownLength(int ticks) Sets the length in ticks the spawner will stay in cooldown for.- Parameters:
- ticks- the number of ticks
 
- 
getRequiredPlayerRangeint getRequiredPlayerRange()Get the maximum distance a player can be in order for this spawner to be active.
 If this value is less than or equal to 0, this spawner is always active (given that there are players online).
 Default value is 16.- Returns:
- the maximum distance a player can be in order for this spawner to be active.
 
- 
setRequiredPlayerRangevoid setRequiredPlayerRange(int requiredPlayerRange) Set the maximum distance a player can be in order for this spawner to be active.
 Setting this value to less than or equal to 0 will make this spawner always active (given that there are players online).- Parameters:
- requiredPlayerRange- the maximum distance a player can be in order for this spawner to be active.
 
- 
getTrackedPlayersGets the players this spawner is currently tracking.Note: the returned collection is immutable, use startTrackingPlayer(Player)orstopTrackingPlayer(Player)instead.- Returns:
- a collection of players this spawner is tracking or an empty collection if there aren't any
 
- 
isTrackingPlayerChecks if this spawner is currently tracking the provided player.- Parameters:
- player- the player
- Returns:
- true if this spawner is tracking the provided player
 
- 
startTrackingPlayerForce this spawner to start tracking the provided player.Note: the spawner may decide to stop tracking this player at any given time. - Parameters:
- player- the player
 
- 
stopTrackingPlayerForce this spawner to stop tracking the provided player.Note: the spawner may decide to start tracking this player again at any given time. - Parameters:
- player- the player
 
- 
getTrackedEntitiesGets a list of entities this spawner is currently tracking.Note: the returned collection is immutable, use startTrackingEntity(Entity)orstopTrackingEntity(Entity)instead.- Returns:
- a collection of entities this spawner is tracking or an empty collection if there aren't any
 
- 
isTrackingEntityChecks if this spawner is currently tracking the provided entity.- Parameters:
- entity- the entity
- Returns:
- true if this spawner is tracking the provided entity
 
- 
startTrackingEntityForce this spawner to start tracking the provided entity.Note: the spawner may decide to stop tracking this entity at any given time. - Parameters:
- entity- the entity
 
- 
stopTrackingEntityForce this spawner to stop tracking the provided entity.Note: the spawner may decide to start tracking this entity again at any given time. - Parameters:
- entity- the entity
 
- 
isOminousboolean isOminous()Checks if this spawner is using the ominousTrialSpawnerConfiguration.- Returns:
- true is using the ominous configuration
 
- 
setOminousvoid setOminous(boolean ominous) Changes this spawner between the normal and ominousTrialSpawnerConfiguration.- Parameters:
- ominous- true to use the ominous TrialSpawnerConfiguration, false to use the normal one.
 
- 
getNormalConfigurationGets theTrialSpawnerConfigurationused whenisOminous()is false.- Returns:
- the TrialSpawnerConfiguration
 
- 
getOminousConfigurationGets theTrialSpawnerConfigurationused whenisOminous()is true.- Returns:
- the TrialSpawnerConfiguration
 
 
-