This commit is contained in:
Jesse Boyd 2016-10-27 06:05:32 +11:00
parent c3af25ddf7
commit 102468c2fd
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
3 changed files with 13 additions and 4 deletions

View File

@ -120,6 +120,7 @@ public class AsyncWorld extends DelegateFaweQueue implements World, HasFaweQueue
flush();
this.parent = world;
this.queue = queue;
setParent(queue);
}
public World getBukkitWorld() {

View File

@ -29,7 +29,7 @@ import java.util.concurrent.ExecutorCompletionService;
public abstract class FaweQueue {
private World weWorld;
private final String world;
private String world;
private ConcurrentLinkedDeque<EditSession> sessions;
private long modified = System.currentTimeMillis();
private RunnableVal2<FaweChunk, FaweChunk> changeTask;
@ -40,9 +40,11 @@ public abstract class FaweQueue {
}
public FaweQueue(World world) {
if (world != null) {
this.weWorld = world;
this.world = Fawe.imp().getWorldName(world);
}
}
public enum ProgressType {
QUEUE,
@ -56,6 +58,11 @@ public abstract class FaweQueue {
ALL,
}
public void setWorld(String world) {
this.world = world;
this.weWorld = null;
}
public void addEditSession(EditSession session) {
if (session == null) {
return;

View File

@ -18,7 +18,7 @@ public class DelegateFaweQueue extends FaweQueue {
private FaweQueue parent;
public DelegateFaweQueue(FaweQueue parent) {
super(parent.getWEWorld());
super(parent == null ? null : parent.getWEWorld());
this.parent = parent;
}
@ -28,6 +28,7 @@ public class DelegateFaweQueue extends FaweQueue {
public void setParent(FaweQueue parent) {
this.parent = parent;
setWorld(parent.getWorldName());
}
@Override