Package net.minecraftforge.client.event
Class RegisterClientCommandsEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RegisterClientCommandsEvent
public class RegisterClientCommandsEvent
extends net.minecraftforge.eventbus.api.Event
Register commands to be executed on the client using this event.
Some arguments behave differently:
ResourceLocationArgument.getAdvancement(com.mojang.brigadier.context.CommandContext, String)
only returns advancements that are shown on the advancements screenObjectiveArgument.getObjective(com.mojang.brigadier.context.CommandContext, String)
only returns objectives that are set to display
-
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 final com.mojang.brigadier.CommandDispatcher<CommandSourceStack>
-
Constructor Summary
ConstructorDescriptionRegisterClientCommandsEvent
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher) -
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
-
-
Constructor Details
-
RegisterClientCommandsEvent
public RegisterClientCommandsEvent(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher)
-
-
Method Details
-
getDispatcher
- Returns:
- The command dispatcher for registering commands to be executed on the client
-