Set Server Port After Loading Config

This commit is contained in:
Dark98
2021-11-23 00:46:46 +00:00
parent 8fc1e17a25
commit 8ab31771b3
@@ -131,11 +131,7 @@ public class GameEngine {
private final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
private final static Lock lock = new ReentrantLock();
/**
* Port and Cycle rate.
*/
static {
serverlistenerPort = (GameConstants.WORLD == 1) ? 43594 : 43596 + GameConstants.WORLD;
shutdownServer = false;
}
@@ -158,6 +154,7 @@ public class GameEngine {
}
}
}
serverlistenerPort = (GameConstants.WORLD == 1) ? 43594 : 43596 + GameConstants.WORLD;
System.out.println("Starting game engine..");
if (GameConstants.SERVER_DEBUG) {