mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 08:44:50 +00:00
Close Iris GUI windows on the Swing thread when the plugin shuts down
Windows otherwise outlive the plugin and keep drawing with threads its shutdown has stopped. GuiHost.closeWindows disposes every managed frame on the Swing thread and waits at most 5 s, in case that thread is itself waiting on the server. The Bukkit plugin runs it with its post-shutdown cleanup and the modded stop sequence runs it before clearing the GUI host. v3: 6793e34d8
This commit is contained in:
1 parent
7e4c159039
commit
88ee0e89f7
4 files changed
+57
-2
No files matched your search
@@ -56,6 +56,7 @@ import art.arcane.iris.core.link.MultiverseCoreLink;
|
||||
import art.arcane.iris.core.agent.AttachSignal;
|
||||
import art.arcane.iris.core.nms.INMS;
|
||||
import art.arcane.iris.core.gui.BukkitGuiHost;
|
||||
import art.arcane.iris.core.gui.GuiHost;
|
||||
import art.arcane.iris.core.gui.PregeneratorJob;
|
||||
import art.arcane.iris.core.service.BoardSVC;
|
||||
import art.arcane.iris.core.service.CommandSVC;
|
||||
@@ -845,6 +846,7 @@ public class Iris extends VolmitPlugin implements Listener, ReloadAware {
|
||||
return;
|
||||
}
|
||||
BukkitGuiHost.install();
|
||||
postShutdown(GuiHost::closeWindows);
|
||||
// super.onEnable() already registers this instance as a listener.
|
||||
super.onEnable();
|
||||
if (IrisStartupValidation.isRestartRequired()) {
|
||||
|
||||
Reference in new issue
Block a user