mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 13:45:36 +01:00
*
This commit is contained in:
parent
c3af25ddf7
commit
102468c2fd
@ -120,6 +120,7 @@ public class AsyncWorld extends DelegateFaweQueue implements World, HasFaweQueue
|
||||
flush();
|
||||
this.parent = world;
|
||||
this.queue = queue;
|
||||
setParent(queue);
|
||||
}
|
||||
|
||||
public World getBukkitWorld() {
|
||||
|
@ -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,8 +40,10 @@ public abstract class FaweQueue {
|
||||
}
|
||||
|
||||
public FaweQueue(World world) {
|
||||
this.weWorld = world;
|
||||
this.world = Fawe.imp().getWorldName(world);
|
||||
if (world != null) {
|
||||
this.weWorld = world;
|
||||
this.world = Fawe.imp().getWorldName(world);
|
||||
}
|
||||
}
|
||||
|
||||
public enum ProgressType {
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user