Class SubCommand
java.lang.Object
me.lorenzo0111.pluginslib.command.SubCommand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionICommand<?>abstract StringgetName()abstract voidhandleSubcommand(User<?> sender, String[] args) Abstract method to handle the subcommandvoidParent of the handleSubcommand abstract method.voidsetPermission(String permission, String message) Do not use this method
-
Constructor Details
-
SubCommand
- Parameters:
command- Parent of the subcommand
-
-
Method Details
-
getName
- Returns:
- Name of the subcommand ( /command name )
-
getCommand
- Returns:
- Parent of the subcommand
-
perform
Parent of the handleSubcommand abstract method. This method is used for permission check- Parameters:
sender- Command executorargs- Args of the command. The args[0] will be thegetName()
-
handleSubcommand
Abstract method to handle the subcommand- Parameters:
sender- Command executorargs- Args of the command. The args[0] will be thegetName()
-
setPermission
public void setPermission(String permission, String message) throws NoSuchMethodException, LibraryException Do not use this method- Parameters:
permission- Permission required from the subcommandmessage- Error message- Throws:
NoSuchMethodException- Strange, that methods exists..LibraryException- Caused when someone manually call this method.
-