diff --git a/src/de/steamwar/bungeecore/listeners/BanListener.java b/src/de/steamwar/bungeecore/listeners/BanListener.java index 810e95a0..9c8b85c7 100644 --- a/src/de/steamwar/bungeecore/listeners/BanListener.java +++ b/src/de/steamwar/bungeecore/listeners/BanListener.java @@ -33,7 +33,6 @@ import net.md_5.bungee.api.event.LoginEvent; import net.md_5.bungee.event.EventHandler; import java.sql.Timestamp; -import java.time.Instant; import java.time.format.DateTimeFormatter; import java.util.List; @@ -52,7 +51,7 @@ public class BanListener extends BasicListener { List ips = BannedUserIPs.get(event.getConnection().getAddress().getAddress().getHostAddress()); if(!ips.isEmpty()){ - Timestamp highestBan = Timestamp.from(Instant.now()); + Timestamp highestBan = ips.get(0).getTimestamp(); for(BannedUserIPs banned : ips) { if(highestBan.before(banned.getTimestamp())) highestBan = banned.getTimestamp(); @@ -70,8 +69,8 @@ public class BanListener extends BasicListener { for(BannedUserIPs banned : ips) { SteamwarUser bannedUser = SteamwarUser.get(banned.getUserID()); - potentialBan.append(Message.parse("BAN_AVOIDING_LIST", target, bannedUser.getId(), - banned.getTimestamp().toLocalDateTime().format(BungeeCore.DATE_FORMAT), bannedUser.getUserName())); + potentialBan.append(Message.parse("BAN_AVOIDING_LIST", target, bannedUser.getUserName(), + banned.getTimestamp().toLocalDateTime().format(BungeeCore.DATE_FORMAT))); } TextComponent msg = new TextComponent(potentialBan.toString());