Class MTVCommand
java.lang.Object
nl.mtvehicles.core.infrastructure.models.MTVCommand
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
- Direct Known Subclasses:
VehicleSubCommandManager
Abstract class for the plugin's commands
-
Field Summary
Modifier and TypeFieldDescriptionorg.bukkit.command.CommandSender
The command sender -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
execute(org.bukkit.command.CommandSender sender, org.bukkit.command.Command cmd, String label, String[] args)
Code executed on use of the commandboolean
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
-
Field Details
-
commandSender
public org.bukkit.command.CommandSender commandSenderThe 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 interfaceorg.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 commandcmd
- Command which was executedlabel
- Alias of the command which was usedargs
- Passed command arguments- Returns:
- True if successful
-
sendMessage
Send a message to the command sender- Parameters:
message
- Message
-