SystemPanel variables moved to GameServer to fix compiling issue.

This commit is contained in:
MobiusDevelopment
2020-04-01 11:08:00 +00:00
parent 0c0bc9a33a
commit f2a7531d24
111 changed files with 296 additions and 295 deletions

View File

@@ -58,6 +58,10 @@ import org.l2jmobius.loginserver.LoginController;
public class GameServer extends Thread
{
static Logger _log = Logger.getLogger(GameServer.class.getName());
public static volatile int MAX_CONNECTED_COUNT = 0;
public static volatile int OFFLINE_TRADE_COUNT = 0;
private ServerSocket _serverSocket;
private final ItemTable _itemTable;

View File

@@ -42,9 +42,6 @@ public class SystemPanel extends JPanel
{
private static final long START_TIME = System.currentTimeMillis();
public static volatile int MAX_CONNECTED_COUNT = 0;
public static volatile int OFFLINE_TRADE_COUNT = 0;
public SystemPanel()
{
setBackground(Color.WHITE);
@@ -120,12 +117,12 @@ public class SystemPanel extends JPanel
public void run()
{
final int playerCount = World.getInstance().getAllPlayers().size();
if (MAX_CONNECTED_COUNT < playerCount)
if (GameServer.MAX_CONNECTED_COUNT < playerCount)
{
MAX_CONNECTED_COUNT = playerCount;
GameServer.MAX_CONNECTED_COUNT = playerCount;
}
lblConnected.setText("Connected: " + playerCount);
lblMaxConnected.setText("Max connected: " + MAX_CONNECTED_COUNT);
lblMaxConnected.setText("Max connected: " + GameServer.MAX_CONNECTED_COUNT);
lblElapsedTime.setText("Elapsed: " + getDurationBreakdown(System.currentTimeMillis() - START_TIME));
}
}, 1000, 1000);