public interface ApiMain
ServicesManager - this is to allow easy updating across Minecraft
versions.| Modifier and Type | Method and Description |
|---|---|
void |
changeTemplate(org.bukkit.World templated,
org.bukkit.World newTemplate)
Change the template for the given templated world.
|
org.bukkit.World |
createWorld(String name,
org.bukkit.World template)
Create a new templated world with the given name and template world
|
org.bukkit.World |
createWorld(String name,
org.bukkit.World template,
Collection<org.bukkit.generator.BlockPopulator> extraPopulators)
Create a templated world with the given name, template world, and extra
BlockPopulators from your plugin.
|
org.bukkit.generator.ChunkGenerator |
getTemplatedGenerator(String world,
String template)
Get a templated ChunkGenerator for the given world.
|
org.bukkit.generator.ChunkGenerator |
getVoidGenerator()
Get a ChunkGenerator that will only create empty (all air / void)
chunks.
|
boolean |
isTemplatedWorld(org.bukkit.World world)
Check whether the given World was created by this plugin.
|
void |
onDisable(org.bukkit.plugin.Plugin templateWorlds)
Please do not call this method.
|
void |
onEnable(org.bukkit.plugin.Plugin templateWorlds)
Please do not call this method.
|
void |
resetArea(org.bukkit.World templated,
int chunkMinX,
int chunkMinZ,
int chunkMaxX,
int chunkMaxZ)
Reset all chunks in the given area to the chunks in the template world.
|
void |
resetArea(org.bukkit.World templated,
org.bukkit.Location a,
org.bukkit.Location b)
Reset all chunks in the area bounded in X and Z by the two locations to
the chunks in the template world.
|
void |
resetAreaGradually(org.bukkit.World templated,
int chunkMinX,
int chunkMinZ,
int chunkMaxX,
int chunkMaxZ,
Runnable callback)
Reset all chunks in the given area to the chunks in the template world
over time.
|
void |
resetAreaGradually(org.bukkit.World templated,
int chunkMinX,
int chunkMinZ,
int chunkMaxX,
int chunkMaxZ,
Runnable callback,
double timeAllotment)
Reset all chunks in the given area to the chunks in the template world
over time.
|
void |
resetAreaGradually(org.bukkit.World templated,
org.bukkit.Location a,
org.bukkit.Location b,
Runnable callback)
Reset all chunks in the area bounded in X and Z by the two locations to
the chunks in the template world over time.
|
void onEnable(org.bukkit.plugin.Plugin templateWorlds)
void onDisable(org.bukkit.plugin.Plugin templateWorlds)
org.bukkit.World createWorld(String name, org.bukkit.World template)
name - name of the world folder for the templated worldtemplate - the world to use as the templateorg.bukkit.World createWorld(String name, org.bukkit.World template, Collection<org.bukkit.generator.BlockPopulator> extraPopulators)
name - name of the world folder for the templated worldtemplate - the world to use as the templateorg.bukkit.generator.ChunkGenerator getTemplatedGenerator(String world, String template)
This allows people to create templated worlds from the command line with Multiverse or from bukkit.yml.
world - the world this is being created fortemplate - a string that should be the template worldorg.bukkit.generator.ChunkGenerator getVoidGenerator()
boolean isTemplatedWorld(org.bukkit.World world)
world - a world that may or may not be templatedvoid resetAreaGradually(org.bukkit.World templated,
int chunkMinX,
int chunkMinZ,
int chunkMaxX,
int chunkMaxZ,
Runnable callback)
templated - A templated worldchunkMinX - low chunk-coord X to regeneratechunkMinZ - low chunk-coord Z to regeneratechunkMaxX - high chunk-coord X to regeneratechunkMaxZ - high chunk-coord Z to regeneratecallback - A Runnable to execute once the resetting is completed.
It will be executed on the server main thread. May be null.IllegalArgumentException - if max < minIllegalArgumentException - if the provided world is not a
templated worldvoid resetAreaGradually(org.bukkit.World templated,
org.bukkit.Location a,
org.bukkit.Location b,
Runnable callback)
templated - A templated worlda - one corner of the bounding boxb - opposite corner of the bounding boxcallback - A Runnable to execute once the resetting is completed.
It will be executed on the server main thread. May be null.IllegalArgumentException - if the provided world is not a
templated worldvoid resetAreaGradually(org.bukkit.World templated,
int chunkMinX,
int chunkMinZ,
int chunkMaxX,
int chunkMaxZ,
Runnable callback,
double timeAllotment)
templated - A templated worldchunkMinX - low chunk-coord X to regeneratechunkMinZ - low chunk-coord Z to regeneratechunkMaxX - high chunk-coord X to regeneratechunkMaxZ - high chunk-coord Z to regeneratecallback - A Runnable to execute once the resetting is completed.
It will be executed on the server main thread. May be null.timeAllotment - What FRACTION of 1/20th of a second (one tick) to
spend doing the reset. If the allotment is less than the
time it takes to reset a chunk, only 1 chunk will be reset
per tick. Be warned that values in excess of 100 billion may
also exhibit this behavior, due to overflow of the long
type.IllegalArgumentException - if max < minIllegalArgumentException - if the provided world is not a
templated worldvoid resetArea(org.bukkit.World templated,
int chunkMinX,
int chunkMinZ,
int chunkMaxX,
int chunkMaxZ)
templated - A templated worldchunkMinX - low chunk-coord X to regeneratechunkMinZ - low chunk-coord Z to regeneratechunkMaxX - high chunk-coord X to regeneratechunkMaxZ - high chunk-coord Z to regenerateIllegalArgumentException - if max < minIllegalArgumentException - if the provided world is not a
templated worldvoid resetArea(org.bukkit.World templated,
org.bukkit.Location a,
org.bukkit.Location b)
templated - A templated worlda - one corner of the bounding boxb - opposite corner of the bounding boxIllegalArgumentException - if the provided world is not a
templated worldvoid changeTemplate(org.bukkit.World templated,
org.bukkit.World newTemplate)
After changing the template, you must reset the area for the changes to take effect.
templated - A templated worldnewTemplate - The world to use as the new templateIllegalArgumentException - if the provided world is not a
templated worldCopyright © 2013. All rights reserved.