Basic cleanup for the Shutdown class.

This commit is contained in:
MobiusDevelopment 2021-11-30 02:50:06 +00:00
parent a1d39adb1c
commit 0410494e1c
25 changed files with 290 additions and 269 deletions

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SEC_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -79,7 +79,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -302,14 +302,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -331,7 +331,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -354,7 +354,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -396,7 +396,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -407,8 +409,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -527,19 +528,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -197,7 +197,7 @@ public class Shutdown extends Thread
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -229,7 +229,7 @@ public class Shutdown extends Thread
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -241,7 +241,7 @@ public class Shutdown extends Thread
/**
* set shutdown mode to ABORT
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -288,8 +288,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
if (_shutdownMode == ABORT)
{
@ -379,11 +378,11 @@ public class Shutdown extends Thread
}
/**
* this sends a last byebye, disconnects all players and saves data
* This sends a last byebye, disconnects all players and saves data.
*/
private synchronized void saveData()
{
final AnnouncementsTable _an = AnnouncementsTable.getInstance();
final AnnouncementsTable announcements = AnnouncementsTable.getInstance();
switch (_shutdownMode)
{
case SIGTERM:
@ -404,7 +403,7 @@ public class Shutdown extends Thread
}
try
{
_an.announceToAll("Server is " + MODE_TEXT[_shutdownMode] + " NOW!");
announcements.announceToAll("Server is " + MODE_TEXT[_shutdownMode] + " NOW!");
}
catch (Throwable t)
{

View File

@ -199,7 +199,7 @@ public class Shutdown extends Thread
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -231,7 +231,7 @@ public class Shutdown extends Thread
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -243,7 +243,7 @@ public class Shutdown extends Thread
/**
* set shutdown mode to ABORT
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -290,8 +290,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
if (_shutdownMode == ABORT)
{
@ -381,11 +380,11 @@ public class Shutdown extends Thread
}
/**
* this sends a last byebye, disconnects all players and saves data
* This sends a last byebye, disconnects all players and saves data.
*/
private synchronized void saveData()
{
final AnnouncementsTable _an = AnnouncementsTable.getInstance();
final AnnouncementsTable announcements = AnnouncementsTable.getInstance();
switch (_shutdownMode)
{
case SIGTERM:
@ -406,7 +405,7 @@ public class Shutdown extends Thread
}
try
{
_an.announceToAll("Server is " + MODE_TEXT[_shutdownMode] + " NOW!");
announcements.announceToAll("Server is " + MODE_TEXT[_shutdownMode] + " NOW!");
}
catch (Throwable t)
{

View File

@ -84,7 +84,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -307,14 +307,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -336,7 +336,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -359,7 +359,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -401,7 +401,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -412,8 +414,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -557,19 +558,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -84,7 +84,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -307,14 +307,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -336,7 +336,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -359,7 +359,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -401,7 +401,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -412,8 +414,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -557,19 +558,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}

View File

@ -80,7 +80,7 @@ public class Shutdown extends Thread
* This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
* @param seconds seconds until shutdown
*/
private void SendServerQuit(int seconds)
private void sendServerQuit(int seconds)
{
final SystemMessage sysm = new SystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECOND_S_PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT);
sysm.addInt(seconds);
@ -303,14 +303,14 @@ public class Shutdown extends Thread
}
default:
{
SendServerQuit(seconds);
sendServerQuit(seconds);
}
}
}
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
}
if (Config.PRECAUTIONARY_RESTART_ENABLED)
@ -332,7 +332,7 @@ public class Shutdown extends Thread
LOGGER.warning("GM: " + (player != null ? player.getName() + "(" + player.getObjectId() + ") " : "") + "issued shutdown ABORT. " + MODE_TEXT[_shutdownMode] + " has been stopped!");
if (_counterInstance != null)
{
_counterInstance._abort();
_counterInstance.abort();
if (Config.PRECAUTIONARY_RESTART_ENABLED)
{
@ -355,7 +355,7 @@ public class Shutdown extends Thread
/**
* Set shutdown mode to ABORT.
*/
private void _abort()
private void abort()
{
_shutdownMode = ABORT;
}
@ -397,7 +397,9 @@ public class Shutdown extends Thread
case 3:
case 2:
case 1:
SendServerQuit(_secondsShut);
{
sendServerQuit(_secondsShut);
}
}
// Prevent players from logging in.
@ -408,8 +410,7 @@ public class Shutdown extends Thread
_secondsShut--;
final int delay = 1000; // milliseconds
Thread.sleep(delay);
Thread.sleep(1000);
}
}
catch (Exception e)
@ -532,19 +533,19 @@ public class Shutdown extends Thread
restartCounter();
}
protected void restartCounter()
public void restartCounter()
{
_startTime = Chronos.currentTimeMillis();
}
protected long getEstimatedTimeAndRestartCounter()
public long getEstimatedTimeAndRestartCounter()
{
final long toReturn = Chronos.currentTimeMillis() - _startTime;
restartCounter();
return toReturn;
}
protected long getEstimatedTime()
public long getEstimatedTime()
{
return Chronos.currentTimeMillis() - _startTime;
}