Class BanIpCommand
java.lang.Object
net.minecraft.server.dedicated.command.BanIpCommand
public class BanIpCommand extends Object
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description BanIpCommand()
-
Method Summary
Modifier and Type Method 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)
-
Field Details
-
PATTERN
-
INVALID_IP_EXCEPTION
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_IP_EXCEPTION -
ALREADY_BANNED_EXCEPTION
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ALREADY_BANNED_EXCEPTION
-
-
Constructor Details
-
BanIpCommand
public BanIpCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher) -
checkIp
private static int checkIp(ServerCommandSource source, String target, @Nullable Text reason) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
banIp
private static int banIp(ServerCommandSource source, String targetIp, @Nullable Text reason) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-