Fix X11 Error On Headless Servers With GUI Disabled (#573)

This commit is contained in:
Josh Shippam authored and GitHub committed 2023-02-02 05:00:54 +00:00
1 parent fa7418929e
commit 209dae48a6
4 files changed
+214 -208

No files matched your search

@@ -112,7 +112,7 @@ public class GameEngine {
public static Trawler trawler = new Trawler();
private final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
private final static Lock lock = new ReentrantLock();
public static ControlPanel panel = new ControlPanel();
public static ControlPanel panel;
static {
shutdownServer = false;
@@ -209,6 +209,8 @@ public class GameEngine {
* Makes Visible Control Panel If Enabled
*/
if(GameConstants.GUI_ENABLED) {
ControlPanel panel = new ControlPanel();
panel.initComponents();
panel.setVisible(true);
System.out.println("Control Panel Enabled.");
}