Interface CommandRegistrationEvent


public interface CommandRegistrationEvent
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    register(com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher, net.minecraft.commands.CommandBuildContext registry, net.minecraft.commands.Commands.CommandSelection selection)
    This event is invoked after the server registers it's commands.
  • Field Details

  • Method Details

    • register

      void register(com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher, net.minecraft.commands.CommandBuildContext registry, net.minecraft.commands.Commands.CommandSelection selection)
      This event is invoked after the server registers it's commands. Equivalent to Forge's RegisterCommandsEvent and Fabric's CommandRegistrationCallback.
      Parameters:
      dispatcher - The command dispatcher to register commands to.
      registry - The command registry for building arguments.
      selection - The selection where the command can be executed.