类 RegisterCommandsEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.RegisterCommandsEvent

public class RegisterCommandsEvent extends net.minecraftforge.eventbus.api.Event
Commands are rebuilt whenever ReloadableServerResources is recreated. You can use this event to register your commands whenever the Commands class in constructed. The event is fired on the MinecraftForge.EVENT_BUS
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • 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
    • getCommandSelection

      public Commands.CommandSelection getCommandSelection()
      返回 the environment the command is being registered for。
      返回:
      the environment the command is being registered for
    • getBuildContext

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