From 72116d809bc8d44c6dabd125fe3d684895e2eebe Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 11 Mar 2021 12:00:11 -0800 Subject: [PATCH] Add another error message if mcMMO finds something unexpected in the database --- .../gmail/nossr50/database/FlatfileDatabaseManager.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java index d3a761792..ef4f7ff5f 100644 --- a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java @@ -310,16 +310,15 @@ public final class FlatfileDatabaseManager implements DatabaseManager { boolean wroteUser = false; // While not at the end of the file while ((line = in.readLine()) != null) { - boolean goodData = true; - //Check for incomplete or corrupted data - if(!line.contains(":")) + if(!line.contains(":")) { + mcMMO.p.getLogger().severe("mcMMO found some unexpected data in mcmmo.users and is removing it"); continue; + } String[] splitData = line.split(":"); //This would be rare, but check the splitData for having enough entries to contain a username - if(splitData.length < USERNAME_INDEX) { //UUID have been in mcMMO DB for a very long time so any user without //Something is wrong if we don't have enough split data to have an entry for a username mcMMO.p.getLogger().severe("mcMMO found some corrupted data in mcmmo.users and is removing it.");