Class MTVCommand

java.lang.Object
nl.mtvehicles.core.infrastructure.models.MTVCommand
All Implemented Interfaces:
org.bukkit.command.CommandExecutor
Direct Known Subclasses:
VehicleSubCommandManager

public abstract class MTVCommand extends Object implements org.bukkit.command.CommandExecutor
Abstract class for the plugin's commands
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    org.bukkit.command.CommandSender
    The command sender
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract boolean
    execute​(org.bukkit.command.CommandSender sender, org.bukkit.command.Command cmd, String label, String[] args)
    Code executed on use of the command
    boolean
    onCommand​(@NotNull org.bukkit.command.CommandSender commandSender, @NotNull org.bukkit.command.Command command, @NotNull String label, @NotNull String[] strings)
     
    void
    sendMessage​(String message)
    Send a message to the command sender

    Methods inherited from class java.lang.Object

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

    • commandSender

      public org.bukkit.command.CommandSender commandSender
      The command sender
  • Constructor Details

    • MTVCommand

      public MTVCommand()
  • Method Details

    • onCommand

      public boolean onCommand(@NotNull @NotNull org.bukkit.command.CommandSender commandSender, @NotNull @NotNull org.bukkit.command.Command command, @NotNull @NotNull String label, @NotNull @NotNull String[] strings)
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
    • execute

      public abstract boolean execute(org.bukkit.command.CommandSender sender, org.bukkit.command.Command cmd, String label, String[] args)
      Code executed on use of the command
      Parameters:
      sender - Source of the command
      cmd - Command which was executed
      label - Alias of the command which was used
      args - Passed command arguments
      Returns:
      True if successful
    • sendMessage

      public void sendMessage(String message)
      Send a message to the command sender
      Parameters:
      message - Message