mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 21:56:33 +01:00
*
This commit is contained in:
parent
c3af25ddf7
commit
102468c2fd
@ -120,6 +120,7 @@ public class AsyncWorld extends DelegateFaweQueue implements World, HasFaweQueue
|
|||||||
flush();
|
flush();
|
||||||
this.parent = world;
|
this.parent = world;
|
||||||
this.queue = queue;
|
this.queue = queue;
|
||||||
|
setParent(queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public World getBukkitWorld() {
|
public World getBukkitWorld() {
|
||||||
|
@ -29,7 +29,7 @@ import java.util.concurrent.ExecutorCompletionService;
|
|||||||
public abstract class FaweQueue {
|
public abstract class FaweQueue {
|
||||||
|
|
||||||
private World weWorld;
|
private World weWorld;
|
||||||
private final String world;
|
private String world;
|
||||||
private ConcurrentLinkedDeque<EditSession> sessions;
|
private ConcurrentLinkedDeque<EditSession> sessions;
|
||||||
private long modified = System.currentTimeMillis();
|
private long modified = System.currentTimeMillis();
|
||||||
private RunnableVal2<FaweChunk, FaweChunk> changeTask;
|
private RunnableVal2<FaweChunk, FaweChunk> changeTask;
|
||||||
@ -40,9 +40,11 @@ public abstract class FaweQueue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FaweQueue(World world) {
|
public FaweQueue(World world) {
|
||||||
|
if (world != null) {
|
||||||
this.weWorld = world;
|
this.weWorld = world;
|
||||||
this.world = Fawe.imp().getWorldName(world);
|
this.world = Fawe.imp().getWorldName(world);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public enum ProgressType {
|
public enum ProgressType {
|
||||||
QUEUE,
|
QUEUE,
|
||||||
@ -56,6 +58,11 @@ public abstract class FaweQueue {
|
|||||||
ALL,
|
ALL,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setWorld(String world) {
|
||||||
|
this.world = world;
|
||||||
|
this.weWorld = null;
|
||||||
|
}
|
||||||
|
|
||||||
public void addEditSession(EditSession session) {
|
public void addEditSession(EditSession session) {
|
||||||
if (session == null) {
|
if (session == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -18,7 +18,7 @@ public class DelegateFaweQueue extends FaweQueue {
|
|||||||
private FaweQueue parent;
|
private FaweQueue parent;
|
||||||
|
|
||||||
public DelegateFaweQueue(FaweQueue parent) {
|
public DelegateFaweQueue(FaweQueue parent) {
|
||||||
super(parent.getWEWorld());
|
super(parent == null ? null : parent.getWEWorld());
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ public class DelegateFaweQueue extends FaweQueue {
|
|||||||
|
|
||||||
public void setParent(FaweQueue parent) {
|
public void setParent(FaweQueue parent) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
setWorld(parent.getWorldName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user