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
ServerResources
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 Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate com.mojang.brigadier.CommandDispatcher<CommandSourceStack>
private Commands.CommandSelection
-
Constructor Summary
ConstructorDescriptionRegisterCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, Commands.CommandSelection environment)
-
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
dispatcher
-
environment
-
-
Constructor Details
-
RegisterCommandsEvent
public RegisterCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, Commands.CommandSelection environment)
-
-
Method Details
-
getDispatcher
-
getEnvironment
-