类 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.

另请参阅:
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • getDispatcher

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

      public CommandBuildContext getBuildContext()
      返回 the context to build the commands for。
      返回:
      the context to build the commands for