forked from SteamWar/SteamWar
Fix BanListener inserting bedrock ips
This commit is contained in:
@@ -46,7 +46,9 @@ public class BanListener extends BasicListener {
|
|||||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||||
String ip = IPSanitizer.getTrueAddress(player).getHostAddress();
|
String ip = IPSanitizer.getTrueAddress(player).getHostAddress();
|
||||||
if (user.isPunished(Punishment.PunishmentType.Ban)) {
|
if (user.isPunished(Punishment.PunishmentType.Ban)) {
|
||||||
BannedUserIPs.banIP(user.getId(), ip);
|
if (!player.getUsername().startsWith(".")) {
|
||||||
|
BannedUserIPs.banIP(user.getId(), ip);
|
||||||
|
}
|
||||||
Chatter.of(event).system(PunishmentCommand.punishmentMessage(user, Punishment.PunishmentType.Ban));
|
Chatter.of(event).system(PunishmentCommand.punishmentMessage(user, Punishment.PunishmentType.Ban));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user