Interface CommandRegistrationEvent
public interface CommandRegistrationEvent
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher, net.minecraft.commands.CommandBuildContext registry, net.minecraft.commands.Commands.CommandSelection selection) This event is invoked after the server registers it's commands.
-
Field Details
-
Method Details
-
register
void register(com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher, net.minecraft.commands.CommandBuildContext registry, net.minecraft.commands.Commands.CommandSelection selection) This event is invoked after the server registers it's commands. Equivalent to Forge'sRegisterCommandsEvent
and Fabric'sCommandRegistrationCallback
.- Parameters:
dispatcher
- The command dispatcher to register commands to.registry
- The command registry for building arguments.selection
- The selection where the command can be executed.
-