From a3530ad143005fd9ecb7b6e0466a6d7b1ceb165e Mon Sep 17 00:00:00 2001 From: Paldiu Date: Fri, 31 Mar 2023 21:41:28 -0500 Subject: [PATCH] Fixed a code discrepancy. --- .../totalfreedommod/banning/BanManager.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/commons/src/main/java/me/totalfreedom/totalfreedommod/banning/BanManager.java b/commons/src/main/java/me/totalfreedom/totalfreedommod/banning/BanManager.java index 96c8c81e..9721ca4c 100644 --- a/commons/src/main/java/me/totalfreedom/totalfreedommod/banning/BanManager.java +++ b/commons/src/main/java/me/totalfreedom/totalfreedommod/banning/BanManager.java @@ -35,7 +35,7 @@ public class BanManager extends FreedomService FLog.severe("Failed to load ban list: " + throwable.getMessage()); return; } - + result.getAllRowsResultSet().forEach(row -> { ResultSetProvider banSet = ResultSetProvider.fromRow(row); @@ -53,13 +53,12 @@ public class BanManager extends FreedomService String reason = banSet.getString("reason"); Ban ban = new Ban(name, uuid, ips, by, at, expires, reason); bans.add(ban); + // Remove expired bans, repopulate ipBans and nameBans, + updateViews(); + + FLog.info("Loaded " + ipBans.size() + " IP bans and " + nameBans.size() + " username bans."); }); }); - - // Remove expired bans, repopulate ipBans and nameBans, - updateViews(); - - FLog.info("Loaded " + ipBans.size() + " IP bans and " + nameBans.size() + " username bans."); } @Override @@ -334,4 +333,4 @@ public class BanManager extends FreedomService } } } -} \ No newline at end of file +}