Fixes #32
This commit is contained in:
parent
f3db4be8ae
commit
969c800509
@ -1,6 +1,6 @@
|
||||
name: FastAsyncWorldEdit
|
||||
main: com.boydti.fawe.bukkit.FaweBukkit
|
||||
version: 3.3.9
|
||||
version: 3.3.10
|
||||
description: Fast Async WorldEdit plugin
|
||||
authors: [Empire92]
|
||||
loadbefore: [WorldEdit]
|
||||
|
@ -131,21 +131,20 @@ public class BukkitQueue_1_8 extends BukkitQueue_0 {
|
||||
lcx = cx;
|
||||
lcz = cz;
|
||||
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
|
||||
if (Settings.CHUNK_WAIT > 0) {
|
||||
if (Thread.currentThread() != Fawe.get().getMainThread()) {
|
||||
synchronized (loadQueue) {
|
||||
loadQueue.add(new IntegerPair(cx, cz));
|
||||
try {
|
||||
loadQueue.wait(Settings.CHUNK_WAIT);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
boolean sync = Thread.currentThread() == Fawe.get().getMainThread();
|
||||
if (sync) {
|
||||
bukkitWorld.loadChunk(cx, cz, true);
|
||||
} else if (Settings.CHUNK_WAIT > 0) {
|
||||
synchronized (loadQueue) {
|
||||
loadQueue.add(new IntegerPair(cx, cz));
|
||||
try {
|
||||
loadQueue.wait(Settings.CHUNK_WAIT);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
bukkitWorld.loadChunk(cx, cz, true);
|
||||
}
|
||||
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -127,21 +127,20 @@ public class BukkitQueue_1_9 extends BukkitQueue_0 {
|
||||
lcx = cx;
|
||||
lcz = cz;
|
||||
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
|
||||
if (Settings.CHUNK_WAIT > 0) {
|
||||
if (Thread.currentThread() != Fawe.get().getMainThread()) {
|
||||
synchronized (loadQueue) {
|
||||
loadQueue.add(new IntegerPair(cx, cz));
|
||||
try {
|
||||
loadQueue.wait(Settings.CHUNK_WAIT);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
boolean sync = Thread.currentThread() == Fawe.get().getMainThread();
|
||||
if (sync) {
|
||||
bukkitWorld.loadChunk(cx, cz, true);
|
||||
} else if (Settings.CHUNK_WAIT > 0) {
|
||||
synchronized (loadQueue) {
|
||||
loadQueue.add(new IntegerPair(cx, cz));
|
||||
try {
|
||||
loadQueue.wait(Settings.CHUNK_WAIT);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
bukkitWorld.loadChunk(cx, cz, true);
|
||||
}
|
||||
if (!bukkitWorld.isChunkLoaded(cx, cz)) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.boydti.fawe.forge.v1_8;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.config.Settings;
|
||||
import com.boydti.fawe.forge.SpongeUtil;
|
||||
@ -77,7 +78,10 @@ public class SpongeQueue_1_8 extends SpongeQueue_0 {
|
||||
lcz = cz;
|
||||
Chunk chunk = spongeWorld.getChunk(cx, 0, cz).orElse(null);
|
||||
if (chunk == null || !chunk.isLoaded()) {
|
||||
if (Settings.CHUNK_WAIT > 0) {
|
||||
boolean sync = Thread.currentThread() == Fawe.get().getMainThread();
|
||||
if (sync) {
|
||||
chunk = spongeWorld.loadChunk(cx, 0, cz, true).orElse(null);
|
||||
} else if (Settings.CHUNK_WAIT > 0) {
|
||||
synchronized (loadQueue) {
|
||||
loadQueue.add(new IntegerPair(cx, cz));
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user