From 02c81068e7bb574b8b44ea4ec62e350bb2e23a76 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 12 Sep 2022 17:54:42 +0200 Subject: [PATCH] Fix Double Bans --- src/de/steamwar/bungeecore/sql/SteamwarUser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/sql/SteamwarUser.java b/src/de/steamwar/bungeecore/sql/SteamwarUser.java index a5cb605..4e16de5 100644 --- a/src/de/steamwar/bungeecore/sql/SteamwarUser.java +++ b/src/de/steamwar/bungeecore/sql/SteamwarUser.java @@ -325,14 +325,14 @@ public class SteamwarUser { ProxiedPlayer player = ProxyServer.getInstance().getPlayer(uuid); if (player != null) { - updateBanIP(player.getAddress().getAddress().getHostAddress()); ChatSender.disconnect(player).system(punishmentMessage(punishment)); for (BannedUserIPs banned : BannedUserIPs.get(player.getAddress().getAddress().getHostAddress())) { SteamwarUser bannedUser = SteamwarUser.get(banned.getUserID()); - if (isPunished(punishment) && bannedUser.getPunishment(punishment).getEndTime().before(time)) { + if (bannedUser.isPunished(punishment) && bannedUser.getPunishment(punishment).getEndTime().before(time)) { bannedUser.punish(punishment, time, banReason, from, perma); } } + updateBanIP(player.getAddress().getAddress().getHostAddress()); } else { updateBanIP(""); } -- 2.39.5