mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 11:15:21 +01:00
Handle exceptions from Bukkit on chunk loads - keep from being killed by them...
This commit is contained in:
parent
ff79c2f4fc
commit
a5428b56f1
@ -796,7 +796,15 @@ public class NewMapChunkCache implements MapChunkCache {
|
||||
}
|
||||
chunks_attempted++;
|
||||
boolean wasLoaded = w.isChunkLoaded(chunk.x, chunk.z);
|
||||
boolean didload = w.loadChunk(chunk.x, chunk.z, false);
|
||||
boolean didload = false;
|
||||
try {
|
||||
didload = w.loadChunk(chunk.x, chunk.z, false);
|
||||
} catch (Throwable t) { /* Catch chunk error from Bukkit */
|
||||
Log.warning("Bukkit error loading chunk " + chunk.x + "," + chunk.z + " on " + w.getName());
|
||||
if(!wasLoaded) { /* If wasn't loaded, we loaded it if it now is */
|
||||
didload = w.isChunkLoaded(chunk.x, chunk.z);
|
||||
}
|
||||
}
|
||||
boolean didgenerate = false;
|
||||
/* If we didn't load, and we're supposed to generate, do it */
|
||||
if((!didload) && do_generate && vis)
|
||||
|
Loading…
Reference in New Issue
Block a user