Add announce boolean for suppressing messages for recent changes

This commit is contained in:
riking 2013-07-31 16:59:10 -07:00
parent f49be46cec
commit 34f5343c99

View File

@ -598,6 +598,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
} else { } else {
String oldVersion = null; String oldVersion = null;
StringBuilder newLine = new StringBuilder(line); StringBuilder newLine = new StringBuilder(line);
boolean announce = false;
if (character.length <= 33) { if (character.length <= 33) {
// Introduction of HUDType // Introduction of HUDType
// Version 1.1.06 // Version 1.1.06
@ -632,6 +633,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
time = System.currentTimeMillis(); time = System.currentTimeMillis();
} }
newLine.append(time / Misc.TIME_CONVERSION_FACTOR).append(":"); newLine.append(time / Misc.TIME_CONVERSION_FACTOR).append(":");
announce = true; // TODO move this down
if (oldVersion == null) oldVersion = "1.4.00"; if (oldVersion == null) oldVersion = "1.4.00";
} }
if (character.length <= 38) { if (character.length <= 38) {
@ -641,7 +643,9 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
newLine.append(Config.getInstance().getMobHealthbarDefault().toString()).append(":"); newLine.append(Config.getInstance().getMobHealthbarDefault().toString()).append(":");
if (oldVersion == null) oldVersion = "1.4.06"; if (oldVersion == null) oldVersion = "1.4.06";
} }
if (announce) {
mcMMO.p.debug("Updating database line for player " + character[0] + " from before version " + oldVersion); mcMMO.p.debug("Updating database line for player " + character[0] + " from before version " + oldVersion);
}
writer.append(newLine).append("\r\n"); writer.append(newLine).append("\r\n");
} }
} }