类 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
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段修饰符和类型字段说明private final CommandBuildContext
private final com.mojang.brigadier.CommandDispatcher
<CommandSourceStack> private final Commands.CommandSelection
-
构造器概要
构造器构造器说明RegisterCommandsEvent
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, Commands.CommandSelection environment, CommandBuildContext context) -
方法概要
修饰符和类型方法说明返回 the context to build the commands for。返回 the environment the command is being registered for。com.mojang.brigadier.CommandDispatcher
<CommandSourceStack> 返回 the command dispatcher for registering commands to be executed on the client。从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
dispatcher
-
environment
-
context
-
-
构造器详细资料
-
RegisterCommandsEvent
public RegisterCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, Commands.CommandSelection environment, CommandBuildContext context)
-
-
方法详细资料
-
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
返回 the environment the command is being registered for。- 返回:
- the environment the command is being registered for
-
getBuildContext
返回 the context to build the commands for。- 返回:
- the context to build the commands for
-