Class BanCommand

java.lang.Object
fr.andross.banitem.commands.BanCommand
Direct Known Subclasses:
Commandadd, Commandcheck, Commandhelp, Commandinfo, Commandload, Commandlog, Commandmetaitem, Commandreload, Commandremove

public abstract class BanCommand extends Object
Abstract sub command class.
Version:
3.2
Author:
Andross
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final String[]
    Arguments used by the command sender into the command.
    protected final BanItem
    BanItem plugin instance.
    protected final org.bukkit.command.CommandSender
    Command sender.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BanCommand(@NotNull BanItem plugin, @NotNull org.bukkit.command.CommandSender sender, @NotNull String[] args)
    Create a BanCommand object which handles in game BanItem commands.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected @Nullable String
    Get the "no-permission" message from config
    abstract void
    run()
    Running a subcommand.
    abstract @Nullable List<String>
    Running a subcommand tab.
    protected void
    sendHeaderMessage(@NotNull String title)
    Sending a header separator.
    protected void
    sendMessage(@Nullable String message)
    Send a (colored) message to the sender.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • plugin

      protected final BanItem plugin
      BanItem plugin instance.
    • sender

      protected final org.bukkit.command.CommandSender sender
      Command sender.
    • args

      protected final String[] args
      Arguments used by the command sender into the command.
  • Constructor Details

    • BanCommand

      public BanCommand(@NotNull @NotNull BanItem plugin, @NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String[] args)
      Create a BanCommand object which handles in game BanItem commands.
      Parameters:
      plugin - ban item plugin instance
      sender - the command sender
      args - the arguments for the command used by the sender
  • Method Details

    • sendHeaderMessage

      protected void sendHeaderMessage(@NotNull @NotNull String title)
      Sending a header separator.
      Parameters:
      title - the title of the header
    • sendMessage

      protected void sendMessage(@Nullable @Nullable String message)
      Send a (colored) message to the sender.
      Parameters:
      message - message to send
    • getNoPermMessage

      @Nullable protected @Nullable String getNoPermMessage()
      Get the "no-permission" message from config
      Returns:
      the "no-permission" message from config
    • run

      public abstract void run()
      Running a subcommand.
    • runTab

      @Nullable public abstract @Nullable List<String> runTab()
      Running a subcommand tab.
      Returns:
      list of tab completion