Fixing BannedUserIp Delete
Dieser Commit ist enthalten in:
Ursprung
4dd593243e
Commit
5ee2d10308
@ -47,15 +47,6 @@ public class BanListener extends BasicListener {
|
||||
|
||||
List<BannedUserIPs> ips = BannedUserIPs.get(event.getConnection().getAddress().getAddress().getHostAddress());
|
||||
if(!ips.isEmpty()){
|
||||
if(ips.stream().anyMatch(bannedUserIPs -> bannedUserIPs.getUserID() == user.getId())) {
|
||||
ips.forEach(bannedUserIPs -> {
|
||||
if(bannedUserIPs.getUserID() == user.getId())
|
||||
bannedUserIPs.remove();
|
||||
});
|
||||
ips.removeIf(bannedUserIPs -> bannedUserIPs.getUserID() == user.getId());
|
||||
if(ips.isEmpty())
|
||||
return;
|
||||
}
|
||||
StringBuilder potentialBan = new StringBuilder();
|
||||
potentialBan.append(BungeeCore.CHAT_PREFIX);
|
||||
potentialBan.append("§cMögliche Bannumgehung durch §r");
|
||||
|
@ -151,7 +151,11 @@ public class SteamwarUser {
|
||||
public boolean isBanned() {
|
||||
if(!punishments.containsKey(Punishment.PunishmentType.Ban))
|
||||
return false;
|
||||
return isCurrent(punishments.get(Punishment.PunishmentType.Ban));
|
||||
if(!isCurrent(punishments.get(Punishment.PunishmentType.Ban))) {
|
||||
SQL.update("DELETE FROM BannedUserIPs WHERE UserID = ?", id);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isMuted(){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren