Class ClientCommandInternals
java.lang.Object
net.fabricmc.fabric.impl.command.client.ClientCommandInternals
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCommands(com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> target, FabricClientCommandSource source) static booleanexecuteCommand(String command) Executes a client-sided command.static voidRuns final initialization tasks such asCommandDispatcher.findAmbiguities(AmbiguityConsumer)on the command dispatcher.static @Nullable com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> static voidsetActiveDispatcher(@Nullable com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> dispatcher)
-
Constructor Details
-
ClientCommandInternals
public ClientCommandInternals()
-
-
Method Details
-
setActiveDispatcher
public static void setActiveDispatcher(@Nullable com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> dispatcher) -
getActiveDispatcher
public static @Nullable com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> getActiveDispatcher() -
executeCommand
Executes a client-sided command. Callers should ensure that this is only called on slash-prefixed messages and the slash needs to be removed before calling.- Parameters:
command- the command with slash removed- Returns:
- true if the command should not be sent to the server, false otherwise
-
finalizeInit
public static void finalizeInit()Runs final initialization tasks such asCommandDispatcher.findAmbiguities(AmbiguityConsumer)on the command dispatcher. Also registers a/fcc helpcommand if there are other commands present. -
addCommands
public static void addCommands(com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> target, FabricClientCommandSource source)
-