Class AlpineCommand

java.lang.Object
co.crystaldev.alpinecore.framework.command.AlpineCommand
All Implemented Interfaces:
Activatable

public abstract class AlpineCommand extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    protected final AlpinePlugin
    The plugin that activated this command
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Locked down to prevent improper instantiation.
  • Method Summary

    Modifier and Type
    Method
    Description
    final 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

      protected final AlpinePlugin plugin
      The plugin that activated this command
  • Constructor Details

    • AlpineCommand

      protected AlpineCommand(AlpinePlugin plugin)
      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

      public final void activate(@NotNull @NotNull AlpinePlugin context)
      Description copied from interface: Activatable
      Activate this object.
      Specified by:
      activate in interface Activatable
      Parameters:
      context - The plugin which initiated the request
    • deactivate

      public final void deactivate(@NotNull @NotNull AlpinePlugin context)
      Description copied from interface: Activatable
      Deactivate this object.
      Specified by:
      deactivate in interface Activatable
      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 interface Activatable
      Returns:
      Whether this activatable object can be deactivated.