#963: Add API for in-world structures
By: coll1234567 <joshl5324@gmail.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package org.bukkit.generator.structure;
|
||||
|
||||
import java.util.Collection;
|
||||
import org.bukkit.persistence.PersistentDataHolder;
|
||||
import org.bukkit.util.BoundingBox;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a structure placed in the world.
|
||||
*
|
||||
* @see StructurePiece
|
||||
*/
|
||||
public interface GeneratedStructure extends PersistentDataHolder {
|
||||
|
||||
/**
|
||||
* Gets the bounding box of this placed structure.
|
||||
*
|
||||
* @return bounding box of this placed structure
|
||||
*/
|
||||
@NotNull
|
||||
public BoundingBox getBoundingBox();
|
||||
|
||||
/**
|
||||
* Gets the structure that this PlacedStructure represents.
|
||||
*
|
||||
* @return the structure that this PlacedStructure represents
|
||||
*/
|
||||
@NotNull
|
||||
public Structure getStructure();
|
||||
|
||||
/**
|
||||
* Gets all the {@link StructurePiece} that make up this PlacedStructure.
|
||||
*
|
||||
* @return a collection of all the StructurePieces
|
||||
*/
|
||||
@NotNull
|
||||
public Collection<StructurePiece> getPieces();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.bukkit.generator.structure;
|
||||
|
||||
import org.bukkit.util.BoundingBox;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents an individual part of a {@link GeneratedStructure}.
|
||||
*
|
||||
* @see GeneratedStructure
|
||||
*/
|
||||
public interface StructurePiece {
|
||||
|
||||
/**
|
||||
* Gets the bounding box of this structure piece.
|
||||
*
|
||||
* @return bounding box of this structure piece
|
||||
*/
|
||||
@NotNull
|
||||
public BoundingBox getBoundingBox();
|
||||
}
|
||||
Reference in New Issue
Block a user