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.SimpleCommandExceptionTypeALREADY_BANNED_EXCEPTIONprivate static com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeINVALID_IP_EXCEPTIONstatic PatternPATTERN -
Constructor Summary
Constructors Constructor Description BanIpCommand() -
Method Summary
Modifier and Type Method Description private static intbanIp(ServerCommandSource source, String targetIp, Text reason)private static intcheckIp(ServerCommandSource source, String target, Text reason)static voidregister(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
-