Minor code improvements.

This commit is contained in:
MobiusDev
2016-12-11 20:32:47 +00:00
parent 6a2ccc62e4
commit 70f0330eb0
182 changed files with 1006 additions and 1328 deletions

View File

@@ -113,7 +113,7 @@ public final class CastleManorManager implements IGameXmlReader, IStorable
// Send debug message
if (Config.DEBUG)
{
LOGGER.info(getClass().getSimpleName() + ": Current mode " + _mode.toString());
LOGGER.info(getClass().getSimpleName() + ": Current mode " + _mode);
}
}
else
@@ -432,7 +432,7 @@ public final class CastleManorManager implements IGameXmlReader, IStorable
scheduleModeChange();
if (Config.DEBUG)
{
LOGGER.info(getClass().getSimpleName() + ": Manor mode changed to " + _mode.toString() + "!");
LOGGER.info(getClass().getSimpleName() + ": Manor mode changed to " + _mode + "!");
}
}

View File

@@ -89,7 +89,7 @@ public class ClanHallAuctionManager extends AbstractEventManager<AbstractEvent<?
//@formatter:on
}
public static final ClanHallAuctionManager getInstance()
public static ClanHallAuctionManager getInstance()
{
return SingletonHolder.INSTANCE;
}

View File

@@ -92,14 +92,11 @@ public final class DuelManager
return;
}
}
else
else if ((playerA.getPvpFlag() != 0) || (playerB.getPvpFlag() != 0))
{
if ((playerA.getPvpFlag() != 0) || (playerB.getPvpFlag() != 0))
{
playerA.sendMessage(engagedInPvP);
playerB.sendMessage(engagedInPvP);
return;
}
playerA.sendMessage(engagedInPvP);
playerB.sendMessage(engagedInPvP);
return;
}
final int duelId = _currentDuelId.incrementAndGet();
_duels.put(duelId, new Duel(playerA, playerB, partyDuel, duelId));

View File

@@ -442,7 +442,7 @@ public final class SellBuffsManager implements IGameXmlReader
* Gets the single instance of {@code SellBuffsManager}.
* @return single instance of {@code SellBuffsManager}
*/
public static final SellBuffsManager getInstance()
public static SellBuffsManager getInstance()
{
return SingletonHolder._instance;
}

View File

@@ -72,7 +72,7 @@ public class ServerRestartManager
{
nextRestartTime = new SimpleDateFormat("HH:mm").format(lastRestart.getTime());
ThreadPoolManager.getInstance().scheduleGeneral(new ServerRestartTask(), lastDelay - (Config.SERVER_RESTART_SCHEDULE_COUNTDOWN * 1000));
_log.info("Scheduled server restart at " + lastRestart.getTime().toString() + ".");
_log.info("Scheduled server restart at " + lastRestart.getTime() + ".");
}
}
catch (Exception e)