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 wheneverDataPackRegistries
is recreated. You can use this event to register your commands whenever theCommands
class in constructed. The event is fired on theMinecraftForge.EVENT_BUS
-
-
Field Summary
Fields Modifier and Type Field Description private com.mojang.brigadier.CommandDispatcher<CommandSource>
dispatcher
private Commands.EnvironmentType
environment
-
Constructor Summary
Constructors Constructor Description RegisterCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSource> dispatcher, Commands.EnvironmentType environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mojang.brigadier.CommandDispatcher<CommandSource>
getDispatcher()
Commands.EnvironmentType
getEnvironment()
-
-
-
Field Detail
-
dispatcher
private final com.mojang.brigadier.CommandDispatcher<CommandSource> dispatcher
-
environment
private final Commands.EnvironmentType environment
-
-
Constructor Detail
-
RegisterCommandsEvent
public RegisterCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSource> dispatcher, Commands.EnvironmentType environment)
-
-
Method Detail
-
getDispatcher
public com.mojang.brigadier.CommandDispatcher<CommandSource> getDispatcher()
-
getEnvironment
public Commands.EnvironmentType getEnvironment()
-
-