Change autogenerate-to-visibilitylimits to have options for map-only (temporary generated chunks) versus permanent (world growing)

Fix exception catching code in thread pool
This commit is contained in:
Mike Primm 2011-06-25 16:01:06 -05:00
parent 6dac7f0689
commit 39281188bc
7 changed files with 90 additions and 20 deletions

View file

@ -53,6 +53,7 @@ public class DynmapPlugin extends JavaPlugin {
/* Flag to let code know that we're doing reload - make sure we don't double-register event handlers */
public boolean is_reload = false;
private boolean generate_only = false;
private static boolean ignore_chunk_loads = false; /* Flat to keep us from processing our own chunk loads */
public static File dataDirectory;
public static File tilesDirectory;
@ -248,6 +249,8 @@ public class DynmapPlugin extends JavaPlugin {
WorldListener renderTrigger = new WorldListener() {
@Override
public void onChunkLoad(ChunkLoadEvent event) {
if(ignore_chunk_loads)
return;
if(generate_only) {
if(!isNewChunk(event))
return;
@ -494,4 +497,8 @@ public class DynmapPlugin extends JavaPlugin {
public String getWebPath() {
return configuration.getString("webpath", "web");
}
public static void setIgnoreChunkLoads(boolean ignore) {
ignore_chunk_loads = ignore;
}
}