mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
ACTUALLY ACTUALLY make /mcpurge behave right for flatfile.
This commit is contained in:
parent
7e4188e776
commit
64d3430455
@ -352,7 +352,9 @@ public final class Leaderboard {
|
||||
|
||||
/* Write out the same file but when we get to the player we want to remove, we skip his line. */
|
||||
String[] splitLine = line.split(":");
|
||||
if (splitLine.length > 37 && currentTime - (Misc.getLong(line.split(":")[37]) * 1000) <= purgeTime) {
|
||||
|
||||
if (splitLine.length > 37) {
|
||||
if (currentTime - (Misc.getLong(line.split(":")[37]) * 1000) <= purgeTime) {
|
||||
writer.append(line).append("\r\n");
|
||||
}
|
||||
else {
|
||||
@ -361,6 +363,10 @@ public final class Leaderboard {
|
||||
continue; //Skip the player
|
||||
}
|
||||
}
|
||||
else {
|
||||
writer.append(line).append("\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
out = new FileWriter(usersFilePath); //Write out the new file
|
||||
out.write(writer.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user