Use Long.parseLong because we have a use for the catch

This commit is contained in:
riking 2013-07-31 17:27:57 -07:00
parent 34f5343c99
commit cb8be8b82f

View File

@ -122,13 +122,13 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
} }
String[] character = line.split(":"); String[] character = line.split(":");
String name = character[0]; String name = character[0];
long lastPlayed = StringUtils.getLong(character[37]) * Misc.TIME_CONVERSION_FACTOR; long lastPlayed;
boolean rewrite = false; boolean rewrite = false;
try {
if (lastPlayed == 0) { lastPlayed = Long.parseLong(character[37]) * Misc.TIME_CONVERSION_FACTOR;
OfflinePlayer player = Bukkit.getOfflinePlayer(name); } catch (NumberFormatException e) {
lastPlayed = player.getLastPlayed();
rewrite = true; rewrite = true;
lastPlayed = System.currentTimeMillis();
} }
if (currentTime - lastPlayed > PURGE_TIME) { if (currentTime - lastPlayed > PURGE_TIME) {