Contents
Class CommandRegistry
java.lang.Object
com.hypixel.hytale.registry.Registry<CommandRegistration>
com.hypixel.hytale.server.core.command.system.CommandRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from class Registry
Registry.RegistrationWrapFunction<T> -
Constructor Summary
ConstructorsConstructorDescriptionCommandRegistry(List<BooleanConsumer> registrations, BooleanSupplier precondition, String preconditionMessage, PluginBase plugin) -
Method Summary
Modifier and TypeMethodDescriptionregisterCommand(AbstractCommand command) Register a command for this plugin.Methods inherited from class Registry
enable, getRegistrations, isEnabled, register, shutdown, shutdownAndCleanup, toString
-
Constructor Details
-
CommandRegistry
public CommandRegistry(@Nonnull List<BooleanConsumer> registrations, BooleanSupplier precondition, String preconditionMessage, PluginBase plugin)
-
-
Method Details
-
registerCommand
Register a command for this plugin. This allows the plugin to unregister the command when the module is disabled.- Parameters:
command- The command- Returns:
- the registration, or
nullif the underlyingCommandManager.register(AbstractCommand)failed (the failure is already logged there).
-