Package org.bukkit.block
Interface Structure
- All Superinterfaces:
- BlockState,- Metadatable,- PersistentDataHolder,- TileState
Represents a structure block that can save and load blocks from a file. They
 can only be used by OPs, and are not obtainable in survival.
- 
Method SummaryModifier and TypeMethodDescriptionGet the name of who created this structure.floatGet the integrity of this structure.Get the metadata function this structure block will perform when activated.How this structure is mirrored.The relative position of the structure outline based on the position of the structure block.Get how this structure is rotated.longgetSeed()The seed used to determine how many blocks are removed upon loading of this structure.The name of this structure.The distance to the opposite corner of this structure.Get theUsageModeof this structure block.booleanGet if this structure block is currently showing the bounding box.booleanGet if this structure block should ignore entities.booleanCheck if this structure block is currently showing all air blocksvoidSet the name of whoever created this structure.voidsetAuthor(@NotNull LivingEntity livingEntity) Set the name of whoever created this structure using aLivingEntity.voidsetBoundingBoxVisible(boolean showBoundingBox) Set if this structure box should show the bounding box.voidsetIgnoreEntities(boolean ignoreEntities) While inUsageMode.SAVEmode, this will ignore any entities when saving the structure.voidsetIntegrity(float integrity) Set the integrity of the structure.voidsetMetadata(@NotNull String metadata) Only applicable while inUsageMode.DATA.voidSets the mirroring of the structure.voidsetRelativePosition(@NotNull BlockVector vector) Set the relative position from the structure block.voidsetRotation(@NotNull StructureRotation rotation) Set how this structure is rotated.voidsetSeed(long seed) The seed used to determine which blocks will be removed upon loading.voidsetShowAir(boolean showAir) Set if the structure outline should show air blocks.voidsetStructureName(@NotNull String name) Set the name of this structure.voidsetStructureSize(@NotNull BlockVector vector) Set the maximum size of this structure from the origin point.voidsetUsageMode(@NotNull UsageMode mode) Set theUsageModeof this structure block.Methods inherited from interface org.bukkit.block.BlockStategetBlock, 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- 
getStructureNameThe name of this structure.- Returns:
- structure name
 
- 
setStructureNameSet the name of this structure. This is case-sensitive. The name of the structure in theUsageMode.SAVEstructure block MUST match the name within theUsageMode.CORNERblock or the size calculation will fail.- Parameters:
- name- the case-sensitive name of this structure
 
- 
getAuthorGet the name of who created this structure.- Returns:
- the name of whoever created this structure.
 
- 
setAuthorSet the name of whoever created this structure.- Parameters:
- author- whoever created this structure (not empty)
 
- 
setAuthorSet the name of whoever created this structure using aLivingEntity.- Parameters:
- livingEntity- the entity who created this structure
 
- 
getRelativePositionThe relative position of the structure outline based on the position of the structure block. Maximum allowed distance is 48 blocks in any direction.- Returns:
- a Location which contains the relative distance this structure is from the structure block.
 
- 
setRelativePositionSet the relative position from the structure block. Maximum allowed distance is 48 blocks in any direction.- Parameters:
- vector- the- BlockVectorcontaining the relative origin coordinates of this structure.
 
- 
getStructureSizeThe distance to the opposite corner of this structure. The maximum structure size is 48x48x48. When a structure has successfully been calculated (i.e. it is within the maximum allowed distance) a white border surrounds the structure.- Returns:
- a BlockVectorwhich contains the total size of the structure.
 
- 
setStructureSizeSet the maximum size of this structure from the origin point. Maximum allowed size is 48x48x48.- Parameters:
- vector- the- BlockVectorcontaining the size of this structure, based off of the origin coordinates.
 
- 
setMirrorSets the mirroring of the structure.- Parameters:
- mirror- the new mirroring method
 
- 
getMirrorHow this structure is mirrored.- Returns:
- the current mirroring method
 
- 
setRotationSet how this structure is rotated.- Parameters:
- rotation- the new rotation
 
- 
getRotationGet how this structure is rotated.- Returns:
- the new rotation
 
- 
setUsageModeSet theUsageModeof this structure block.- Parameters:
- mode- the new mode to set.
 
- 
getUsageModeGet theUsageModeof this structure block.- Returns:
- the mode this block is currently in.
 
- 
setIgnoreEntitiesvoid setIgnoreEntities(boolean ignoreEntities) While inUsageMode.SAVEmode, this will ignore any entities when saving the structure.
 While inUsageMode.LOADmode this will ignore any entities that were saved to file.- Parameters:
- ignoreEntities- the flag to set
 
- 
isIgnoreEntitiesboolean isIgnoreEntities()Get if this structure block should ignore entities.- Returns:
- true if the appropriate UsageModeshould ignore entities.
 
- 
setShowAirvoid setShowAir(boolean showAir) Set if the structure outline should show air blocks.- Parameters:
- showAir- if the structure block should show air blocks
 
- 
isShowAirboolean isShowAir()Check if this structure block is currently showing all air blocks- Returns:
- true if the structure block is showing all air blocks
 
- 
setBoundingBoxVisiblevoid setBoundingBoxVisible(boolean showBoundingBox) Set if this structure box should show the bounding box.- Parameters:
- showBoundingBox- if the structure box should be shown
 
- 
isBoundingBoxVisibleboolean isBoundingBoxVisible()Get if this structure block is currently showing the bounding box.- Returns:
- true if the bounding box is shown
 
- 
setIntegrityvoid setIntegrity(float integrity) Set the integrity of the structure. Integrity must be between 0.0 and 1.0 Lower integrity values will result in more blocks being removed when loading a structure. Integrity andgetSeed()are used together to determine which blocks are randomly removed to mimic "decay."- Parameters:
- integrity- the integrity of this structure
 
- 
getIntegrityfloat getIntegrity()Get the integrity of this structure.- Returns:
- the integrity of this structure
 
- 
setSeedvoid setSeed(long seed) The seed used to determine which blocks will be removed upon loading.getIntegrity()and seed are used together to determine which blocks are randomly removed to mimic "decay."- Parameters:
- seed- the seed used to determine how many blocks will be removed
 
- 
getSeedlong getSeed()The seed used to determine how many blocks are removed upon loading of this structure.- Returns:
- the seed used
 
- 
setMetadataOnly applicable while inUsageMode.DATA. Metadata are specific functions that can be applied to the structure location. Consult the Minecraft wiki for more information.- Parameters:
- metadata- the function to perform on the selected location
 
- 
getMetadataGet the metadata function this structure block will perform when activated. Consult the Minecraft Wiki for more information.- Returns:
- the function that will be performed when this block is activated
 
 
-