Add MAIN_THREAD_EXECUTOR to ScriptManager for scheduling commands on the tick thread
All checks were successful
Build JStom / build (push) Successful in 1m23s
All checks were successful
Build JStom / build (push) Successful in 1m23s
This commit is contained in:
@@ -10,8 +10,11 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
public class ScriptManager {
|
public class ScriptManager {
|
||||||
|
public static final Executor MAIN_THREAD_EXECUTOR = command -> MinecraftServer.getSchedulerManager().scheduleNextTick(command);
|
||||||
|
|
||||||
private final File scriptsDir;
|
private final File scriptsDir;
|
||||||
private final Map<String, ScriptEnv> loadedScripts = new HashMap<>();
|
private final Map<String, ScriptEnv> loadedScripts = new HashMap<>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user