Advanced-Portals/core/src/main/java/com/sekwah/advancedportals/core/api/commands/SubCommand.java

43 lines
1.1 KiB
Java
Raw Normal View History

package com.sekwah.advancedportals.core.api.commands;
2020-06-29 01:39:27 +02:00
import com.sekwah.advancedportals.core.connector.container.CommandSenderContainer;
import java.util.List;
/**
2018-01-18 07:28:51 +01:00
* Subcommand that can be registered under e.g. /portal show or /portal edit
*
* @author sekwah41
*/
public interface SubCommand {
/**
* @param sender
* @param args arguments including the subcommand that has been specified.
* @return if the command has worked (if false it will just display a message from the command suggesting to check help)
*/
2018-01-23 17:26:53 +01:00
void onCommand(CommandSenderContainer sender, String[] args);
boolean hasPermission(CommandSenderContainer sender);
/**
*
*
* @param sender
* @param args arguments including the subcommand that has been specified.
* @return tab completion for the subcommand
*/
List<String> onTabComplete(CommandSenderContainer sender, String[] args);
/**
* @return the string to show next to the tag on the help menu.
*/
String getBasicHelpText();
/**
* @return the string to show if help then the tag is listed.
*/
String getDetailedHelpText();
}