Package org.bukkit.block
Interface EntityBlockStorage<T extends Entity>
- Type Parameters:
- T- Entity this block can store
- All Superinterfaces:
- BlockState,- Metadatable,- PersistentDataHolder,- TileState
- All Known Subinterfaces:
- Beehive
Represents a captured state of a block which stores entities.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd an entity to the block.voidClear all currently stored entities in the block.intGet the amount of entities currently in this block.intGet the maximum amount of entities this block can hold.booleanisFull()Check if the block is completely full of entities.Release all the entities currently stored in the block.voidsetMaxEntities(int max) Set the maximum amount of entities this block can hold.Methods inherited from interface org.bukkit.block.BlockStatecopy, 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.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.block.TileStategetPersistentDataContainer, isSnapshot
- 
Method Details- 
isFullboolean isFull()Check if the block is completely full of entities.- Returns:
- True if block is full
 
- 
getEntityCountint getEntityCount()Get the amount of entities currently in this block.- Returns:
- Amount of entities currently in this block
 
- 
getMaxEntitiesint getMaxEntities()Get the maximum amount of entities this block can hold.- Returns:
- Maximum amount of entities this block can hold
 
- 
setMaxEntitiesvoid setMaxEntities(int max) Set the maximum amount of entities this block can hold.- Parameters:
- max- Maximum amount of entities this block can hold
 
- 
releaseEntitiesRelease all the entities currently stored in the block.- Returns:
- List of all entities which were released
 
- 
addEntityAdd an entity to the block.- Parameters:
- entity- Entity to add to the block
 
- 
clearEntitiesvoid clearEntities()Clear all currently stored entities in the block.
 
-