diff --git a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java index 8bede9fa3..cc659665d 100644 --- a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java @@ -122,13 +122,13 @@ public final class FlatfileDatabaseManager implements DatabaseManager { } String[] character = line.split(":"); String name = character[0]; - long lastPlayed = StringUtils.getLong(character[37]) * Misc.TIME_CONVERSION_FACTOR; + long lastPlayed; boolean rewrite = false; - - if (lastPlayed == 0) { - OfflinePlayer player = Bukkit.getOfflinePlayer(name); - lastPlayed = player.getLastPlayed(); + try { + lastPlayed = Long.parseLong(character[37]) * Misc.TIME_CONVERSION_FACTOR; + } catch (NumberFormatException e) { rewrite = true; + lastPlayed = System.currentTimeMillis(); } if (currentTime - lastPlayed > PURGE_TIME) {