Class RegisterClientCommandsEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RegisterClientCommandsEvent

public class RegisterClientCommandsEvent extends net.minecraftforge.eventbus.api.Event
Fired to allow mods to register client commands.

Some command arguments behave differently for the client commands dispatcher:

This event is not cancellable, and does not have a result.

This event is fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getDispatcher

      public com.mojang.brigadier.CommandDispatcher<CommandSourceStack> getDispatcher()
      Returns the command dispatcher for registering commands to be executed on the client.
      Returns:
      the command dispatcher for registering commands to be executed on the client
    • getBuildContext

      public CommandBuildContext getBuildContext()
      Returns the context to build the commands for.
      Returns:
      the context to build the commands for