mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-12 02:40:56 +01:00
Add workaround for Spigot 1.9 problem with unloadChunk(safe=false)
This commit is contained in:
parent
9b72e5b3f1
commit
b10a1585f4
@ -922,11 +922,15 @@ public class NewMapChunkCache extends MapChunkCache {
|
|||||||
* while the actual in-use chunk area for a player where the chunks are managed
|
* while the actual in-use chunk area for a player where the chunks are managed
|
||||||
* by the MC base server is 21x21 (or about a 160 block radius).
|
* by the MC base server is 21x21 (or about a 160 block radius).
|
||||||
* Also, if we did generate it, need to save it */
|
* Also, if we did generate it, need to save it */
|
||||||
helper.unloadChunkNoSave(w, c, chunk.x, chunk.z);
|
if (w.isChunkInUse(chunk.x, chunk.z) == false) {
|
||||||
|
helper.unloadChunkNoSave(w, c, chunk.x, chunk.z);
|
||||||
|
}
|
||||||
endChunkLoad(startTime, ChunkStats.UNLOADED_CHUNKS);
|
endChunkLoad(startTime, ChunkStats.UNLOADED_CHUNKS);
|
||||||
}
|
}
|
||||||
else if (isunloadpending) { /* Else, if loaded and unload is pending */
|
else if (isunloadpending) { /* Else, if loaded and unload is pending */
|
||||||
w.unloadChunkRequest(chunk.x, chunk.z); /* Request new unload */
|
if (w.isChunkInUse(chunk.x, chunk.z) == false) {
|
||||||
|
w.unloadChunkRequest(chunk.x, chunk.z); /* Request new unload */
|
||||||
|
}
|
||||||
endChunkLoad(startTime, ChunkStats.LOADED_CHUNKS);
|
endChunkLoad(startTime, ChunkStats.LOADED_CHUNKS);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user