mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:14:04 +00:00
Run schematic-file I/O in a task.
This commit is contained in:
@@ -21,6 +21,8 @@ package com.sk89q.worldedit;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
import com.sk89q.worldedit.blocks.BaseItem;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.event.platform.BlockInteractEvent;
|
||||
@@ -44,6 +46,7 @@ import com.sk89q.worldedit.scripting.RhinoCraftScriptEngine;
|
||||
import com.sk89q.worldedit.session.SessionManager;
|
||||
import com.sk89q.worldedit.util.Direction;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.concurrency.EvenMoreExecutors;
|
||||
import com.sk89q.worldedit.util.eventbus.EventBus;
|
||||
import com.sk89q.worldedit.util.io.file.FileSelectionAbortedException;
|
||||
import com.sk89q.worldedit.util.io.file.FilenameException;
|
||||
@@ -102,6 +105,7 @@ public final class WorldEdit {
|
||||
private final PlatformManager platformManager = new PlatformManager(this);
|
||||
private final EditSessionFactory editSessionFactory = new EditSessionFactory.EditSessionFactoryImpl(eventBus);
|
||||
private final SessionManager sessions = new SessionManager(this);
|
||||
private final ListeningExecutorService executorService = MoreExecutors.listeningDecorator(EvenMoreExecutors.newBoundedCachedThreadPool(0, 1, 20));;
|
||||
private final Supervisor supervisor = new SimpleSupervisor();
|
||||
|
||||
private final BlockFactory blockFactory = new BlockFactory(this);
|
||||
@@ -152,7 +156,7 @@ public final class WorldEdit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the supervisor.
|
||||
* Get the supervisor. Internal, not for API use.
|
||||
*
|
||||
* @return the supervisor
|
||||
*/
|
||||
@@ -160,6 +164,15 @@ public final class WorldEdit {
|
||||
return supervisor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the executor service. Internal, not for API use.
|
||||
*
|
||||
* @return the executor service
|
||||
*/
|
||||
public ListeningExecutorService getExecutorService() {
|
||||
return executorService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the block factory from which new {@link BlockStateHolder}s can be
|
||||
* constructed.
|
||||
|
Reference in New Issue
Block a user