Interface ClientCommandRegistrationCallback


public interface ClientCommandRegistrationCallback
Callback for when client commands are registered to the dispatcher.

To register some commands, you would register an event listener and implement the callback.

See ClientCommandManager for more details and an example.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    register(com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> dispatcher, net.minecraft.command.CommandRegistryAccess registryAccess)
    Called when registering client commands.
  • Field Details

  • Method Details

    • register

      void register(com.mojang.brigadier.CommandDispatcher<FabricClientCommandSource> dispatcher, net.minecraft.command.CommandRegistryAccess registryAccess)
      Called when registering client commands.
      Parameters:
      dispatcher - the command dispatcher to register commands to
      registryAccess - object exposing access to the game's registries