Package net.minecraftforge.event
Class 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- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final CommandBuildContextprivate final com.mojang.brigadier.CommandDispatcher<CommandSourceStack>private final Commands.CommandSelection
- 
Constructor SummaryConstructorsConstructorDescriptionRegisterCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, Commands.CommandSelection environment, CommandBuildContext context) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the context to build the commands for.Returns the environment the command is being registered for.com.mojang.brigadier.CommandDispatcher<CommandSourceStack>Returns the command dispatcher for registering commands to be executed on the client.Methods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
dispatcher
- 
environment
- 
context
 
- 
- 
Constructor Details- 
RegisterCommandsEventpublic RegisterCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, Commands.CommandSelection environment, CommandBuildContext context) 
 
- 
- 
Method Details- 
getDispatcherReturns 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
 
- 
getCommandSelectionReturns the environment the command is being registered for.- Returns:
- the environment the command is being registered for
 
- 
getBuildContextReturns the context to build the commands for.- Returns:
- the context to build the commands for
 
 
-