Class AlpineCommand
java.lang.Object
co.crystaldev.alpinecore.framework.command.AlpineCommand
- All Implemented Interfaces:
Activatable
A wrapper around LiteCommands to allow for
automatic activation by the framework.
Inheritors should never be manually instantiated.
- Since:
- 0.1.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AlpinePlugin
The plugin that activated this command -
Constructor Summary
ModifierConstructorDescriptionprotected
AlpineCommand
(AlpinePlugin plugin) Locked down to prevent improper instantiation. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
activate
(@NotNull AlpinePlugin context) Activate this object.final boolean
Can this Activatable object be deactivated?final void
deactivate
(@NotNull AlpinePlugin context) Deactivate this object.void
setupCommandManager
(@NotNull dev.rollczi.litecommands.LiteCommandsBuilder<org.bukkit.command.CommandSender, dev.rollczi.litecommands.bukkit.LiteBukkitSettings, ?> builder) Called to register command-specific conditions and suggestions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface co.crystaldev.alpinecore.framework.Activatable
isActive
-
Field Details
-
plugin
The plugin that activated this command
-
-
Constructor Details
-
AlpineCommand
Locked down to prevent improper instantiation.Commands are reflectively instantiated by the framework automatically.
-
-
Method Details
-
setupCommandManager
public void setupCommandManager(@NotNull @NotNull dev.rollczi.litecommands.LiteCommandsBuilder<org.bukkit.command.CommandSender, dev.rollczi.litecommands.bukkit.LiteBukkitSettings, ?> builder) Called to register command-specific conditions and suggestions.- Parameters:
builder
- The LiteCommands builder.
-
activate
Description copied from interface:Activatable
Activate this object.- Specified by:
activate
in interfaceActivatable
- Parameters:
context
- The plugin which initiated the request
-
deactivate
Description copied from interface:Activatable
Deactivate this object.- Specified by:
deactivate
in interfaceActivatable
- Parameters:
context
- The plugin which initiated the request
-
canDeactivate
public final boolean canDeactivate()Description copied from interface:Activatable
Can this Activatable object be deactivated?- Specified by:
canDeactivate
in interfaceActivatable
- Returns:
- Whether this activatable object can be deactivated.
-