Class AbstractCommand
- java.lang.Object
-
- com.github.siroshun09.mccommand.common.AbstractCommand
-
- All Implemented Interfaces:
Command
public abstract class AbstractCommand extends Object implements Command
The abstract class ofCommand.
-
-
Constructor Summary
Constructors Constructor Description AbstractCommand(@NotNull String name)Creates anAbstractCommand.AbstractCommand(@NotNull String name, @Nullable String permission)Creates anAbstractCommand.AbstractCommand(@NotNull String name, @Nullable String permission, @Nullable Set<String> aliases)Creates anAbstractCommand.AbstractCommand(@NotNull String name, @Nullable Set<String> aliases)Creates anAbstractCommand.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)@NotNull @Unmodifiable Set<String>getAliases()Gets aliases of this command.@NotNull StringgetName()Gets the name of this command.@NotNull StringgetPermission()Gets the permission to execute this command.inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.siroshun09.mccommand.common.Command
onExecution, onTabCompletion
-
-
-
-
Constructor Detail
-
AbstractCommand
public AbstractCommand(@NotNull @NotNull String name, @Nullable @Nullable String permission, @Nullable @Nullable Set<String> aliases)
Creates anAbstractCommand.- Parameters:
name- the command namepermission- the permission to execute this commandaliases- the aliases of this command
-
AbstractCommand
public AbstractCommand(@NotNull @NotNull String name, @Nullable @Nullable String permission)
Creates anAbstractCommand.- Parameters:
name- the command namepermission- the permission to execute this command
-
AbstractCommand
public AbstractCommand(@NotNull @NotNull String name, @Nullable @Nullable Set<String> aliases)
Creates anAbstractCommand.- Parameters:
name- the command namealiases- the aliases of this command
-
AbstractCommand
public AbstractCommand(@NotNull @NotNull String name)
Creates anAbstractCommand.- Parameters:
name- the command name
-
-
Method Detail
-
getPermission
@NotNull public @NotNull String getPermission()
Gets the permission to execute this command.- Specified by:
getPermissionin interfaceCommand- Returns:
- the permission to execute this command
-
getAliases
@NotNull public @NotNull @Unmodifiable Set<String> getAliases()
Gets aliases of this command.- Specified by:
getAliasesin interfaceCommand- Returns:
- aliases of this command
-
-