Package org.popcraft.chunky.api
Interface ChunkyAPI
public interface ChunkyAPI
The Chunky API
- 
Method SummaryModifier and TypeMethodDescriptionbooleancancelTask(String world) Cancels a generation task in a world.booleancontinueTask(String world) Continues a generation task in a world.booleanGets whether a generation task is currently running for a world.voidonGenerationComplete(Consumer<GenerationCompleteEvent> listener) Register a listener for generation complete events.voidonGenerationProgress(Consumer<GenerationProgressEvent> listener) Register a listener for generation progress events.booleanPauses a generation task in a world.booleanstartTask(String world, String shape, double centerX, double centerZ, double radiusX, double radiusZ, String pattern) Starts a generation task with a given selection in a world.intversion()Gets the current API version.
- 
Method Details- 
versionint version()Gets the current API version.- Returns:
- The api version
 
- 
isRunningGets whether a generation task is currently running for a world.- Parameters:
- world- The world identifier
- Returns:
- If a task is running in that world
 
- 
startTaskboolean startTask(String world, String shape, double centerX, double centerZ, double radiusX, double radiusZ, String pattern) Starts a generation task with a given selection in a world.- Parameters:
- world- The world identifier
- shape- The selection shape
- centerX- The center x coordinate
- centerZ- The center z coordinate
- radiusX- The primary radius (x-axis)
- radiusZ- The secondary radius (z-axis) (only used for certain shapes)
- pattern- The generation pattern
- Returns:
- If the task was created and started successfully
 
- 
pauseTaskPauses a generation task in a world.- Parameters:
- world- The world identifier
- Returns:
- If the task was paused
 
- 
continueTaskContinues a generation task in a world.- Parameters:
- world- The world identifier
- Returns:
- If the task was continued
 
- 
cancelTaskCancels a generation task in a world.- Parameters:
- world- The world identifier
- Returns:
- If the task was cancelled
 
- 
onGenerationProgressRegister a listener for generation progress events.- Parameters:
- listener- The listener
 
- 
onGenerationCompleteRegister a listener for generation complete events.- Parameters:
- listener- The listener
 
 
-