forked from SteamWar/SteamWar
Fix PunishmentCommand ban localhost for /ban
This commit is contained in:
@@ -21,8 +21,6 @@ package de.steamwar.velocitycore.commands;
|
|||||||
|
|
||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
import com.velocitypowered.api.proxy.Player;
|
import com.velocitypowered.api.proxy.Player;
|
||||||
import de.steamwar.velocitycore.VelocityCore;
|
|
||||||
import de.steamwar.velocitycore.listeners.IPSanitizer;
|
|
||||||
import de.steamwar.command.PreviousArguments;
|
import de.steamwar.command.PreviousArguments;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
@@ -32,6 +30,8 @@ import de.steamwar.sql.BannedUserIPs;
|
|||||||
import de.steamwar.sql.Punishment;
|
import de.steamwar.sql.Punishment;
|
||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import de.steamwar.sql.UserPerm;
|
import de.steamwar.sql.UserPerm;
|
||||||
|
import de.steamwar.velocitycore.VelocityCore;
|
||||||
|
import de.steamwar.velocitycore.listeners.IPSanitizer;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@@ -97,7 +97,9 @@ public class PunishmentCommand {
|
|||||||
bannedUser.punish(Punishment.PunishmentType.Ban, time, banReason, punisher.getId(), perma);
|
bannedUser.punish(Punishment.PunishmentType.Ban, time, banReason, punisher.getId(), perma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BannedUserIPs.banIP(user.getId(), ip);
|
if (!player.getUsername().startsWith(".")) {
|
||||||
|
BannedUserIPs.banIP(user.getId(), ip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user