Fix ConcurrentModificationException on server stop

This commit is contained in:
NichtStudioCode 2023-04-10 12:10:35 +02:00
parent 1f618ea0b0
commit 07063fef82

@ -31,7 +31,7 @@ public class WindowManager implements Listener {
private WindowManager() {
Bukkit.getPluginManager().registerEvents(this, InvUI.getInstance().getPlugin());
InvUI.getInstance().addDisableHandler(() -> windows.values().forEach(window -> window.remove(true)));
InvUI.getInstance().addDisableHandler(() -> new HashSet<>(windows.values()).forEach(window -> window.remove(true)));
}
/**