mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-11-27 04:00:48 +08:00
Shutdown executor service on disable (#2570)
* Shutdown executor service on disable * also do CLI
This commit is contained in:
parent
27bd26607f
commit
84ad34c36f
@ -327,6 +327,7 @@ public void onDisable() {
|
||||
config.unload();
|
||||
}
|
||||
this.getServer().getScheduler().cancelTasks(this);
|
||||
worldEdit.getExecutorService().shutdown();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,6 +205,7 @@ public void onStopped() {
|
||||
WorldEdit worldEdit = WorldEdit.getInstance();
|
||||
worldEdit.getSessionManager().unload();
|
||||
worldEdit.getPlatformManager().unregister(platform);
|
||||
WorldEdit.getInstance().getExecutorService().shutdown();
|
||||
}
|
||||
|
||||
public FileRegistries getFileRegistries() {
|
||||
|
@ -299,6 +299,7 @@ private void onStopServer(MinecraftServer minecraftServer) {
|
||||
WorldEdit worldEdit = WorldEdit.getInstance();
|
||||
worldEdit.getSessionManager().unload();
|
||||
WorldEdit.getInstance().getEventBus().post(new PlatformUnreadyEvent(platform));
|
||||
WorldEdit.getInstance().getExecutorService().shutdown();
|
||||
}
|
||||
|
||||
private boolean skipEvents() {
|
||||
|
@ -257,6 +257,7 @@ public void serverStopping(ServerStoppingEvent event) {
|
||||
WorldEdit worldEdit = WorldEdit.getInstance();
|
||||
worldEdit.getSessionManager().unload();
|
||||
WorldEdit.getInstance().getEventBus().post(new PlatformUnreadyEvent(platform));
|
||||
WorldEdit.getInstance().getExecutorService().shutdown();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
@ -244,6 +244,7 @@ public void serverStopping(StoppingEngineEvent<Server> event) {
|
||||
WorldEdit worldEdit = WorldEdit.getInstance();
|
||||
worldEdit.getSessionManager().unload();
|
||||
WorldEdit.getInstance().getEventBus().post(new PlatformUnreadyEvent(platform));
|
||||
WorldEdit.getInstance().getExecutorService().shutdown();
|
||||
}
|
||||
|
||||
@Listener
|
||||
|
Loading…
Reference in New Issue
Block a user