Class CommandRegistrationCallbackEvent
java.lang.Object
net.vitacraft.serverlibraries.api.event.events.commands.CommandRegistrationCallbackEvent
- All Implemented Interfaces:
Event
Called when a server registers all commands.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandRegistrationCallbackEvent
(com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource> dispatcher, net.minecraft.command.CommandRegistryAccess registryAccess, net.minecraft.server.command.CommandManager.RegistrationEnvironment environment) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.CommandDispatcher
<net.minecraft.server.command.ServerCommandSource> net.minecraft.server.command.CommandManager.RegistrationEnvironment
net.minecraft.command.CommandRegistryAccess
boolean
void
setCancelled
(boolean cancelled)
-
Constructor Details
-
CommandRegistrationCallbackEvent
public CommandRegistrationCallbackEvent(com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource> dispatcher, net.minecraft.command.CommandRegistryAccess registryAccess, net.minecraft.server.command.CommandManager.RegistrationEnvironment environment)
-
-
Method Details
-
getDispatcher
public com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource> getDispatcher()- Returns:
- The command dispatcher.
-
getRegistryAccess
public net.minecraft.command.CommandRegistryAccess getRegistryAccess()- Returns:
- The command registry access.
-
getEnvironment
public net.minecraft.server.command.CommandManager.RegistrationEnvironment getEnvironment()- Returns:
- The registration environment.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceEvent
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceEvent
-