public class BanIpCommand extends Object
Modifier and Type | Field and Description |
---|---|
private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
ALREADY_BANNED_EXCEPTION |
private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
INVALID_IP_EXCEPTION |
static Pattern |
PATTERN |
Constructor and Description |
---|
BanIpCommand() |
Modifier and Type | Method and Description |
---|---|
private static int |
banIp(ServerCommandSource source,
String targetIp,
Text reason) |
private static int |
checkIp(ServerCommandSource source,
String target,
Text reason) |
static void |
register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher) |
public static final Pattern PATTERN
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_IP_EXCEPTION
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ALREADY_BANNED_EXCEPTION
public static void register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher)
private static int checkIp(ServerCommandSource source, String target, @Nullable Text reason) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static int banIp(ServerCommandSource source, String targetIp, @Nullable Text reason) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException