public class Command
extends net.minecraft.command.CommandBase
| Modifier and Type | Method and Description |
|---|---|
<T> Command |
addOptionalArgument(java.lang.String argument,
java.lang.Class<T> type)
Add an optional argument to this command.
|
<T> Command |
addRequiredArgument(java.lang.String argument,
java.lang.Class<T> type)
Add a required argument to this command.
|
java.util.List<java.lang.String> |
addTabCompletionOptions(net.minecraft.command.ICommandSender sender,
java.lang.String[] args) |
static Command |
create(java.lang.String name)
Create a new command instance.
|
java.lang.String |
getCommandName() |
java.lang.String |
getCommandUsage(net.minecraft.command.ICommandSender sender) |
int |
getRequiredPermissionLevel() |
void |
processCommand(net.minecraft.command.ICommandSender sender,
java.lang.String[] args) |
Command |
setPermissionLevel(int permissionLevel)
Set the required permission level for this command.
|
canCommandSenderUseCommand, compareTo, compareTo, doesStringStartWith, func_110665_a, func_110666_a, func_147176_a, func_147178_a, func_152373_a, func_152374_a, func_82360_a, func_96332_d, getBlockByText, getCommandAliases, getCommandSenderAsPlayer, getItemByText, getListOfStringsFromIterableMatchingLastWord, getListOfStringsMatchingLastWord, getPlayer, isUsernameIndex, joinNiceString, joinNiceString, joinNiceStringFromCollection, parseBoolean, parseDouble, parseDoubleBounded, parseDoubleWithMin, parseInt, parseIntBounded, parseIntWithMin, setAdminCommanderpublic static Command create(java.lang.String name)
name - the command namepublic Command setPermissionLevel(int permissionLevel)
permissionLevel - the required permission levelpublic <T> Command addRequiredArgument(java.lang.String argument, java.lang.Class<T> type)
T - the argument typeargument - the argument nametype - the type for this argumentpublic <T> Command addOptionalArgument(java.lang.String argument, java.lang.Class<T> type)
T - the argument typeargument - the argument nametype - the type for this argumentpublic java.lang.String getCommandName()
public int getRequiredPermissionLevel()
getRequiredPermissionLevel in class net.minecraft.command.CommandBasepublic java.lang.String getCommandUsage(net.minecraft.command.ICommandSender sender)
public void processCommand(net.minecraft.command.ICommandSender sender,
java.lang.String[] args)
throws net.minecraft.command.CommandException
net.minecraft.command.CommandExceptionpublic java.util.List<java.lang.String> addTabCompletionOptions(net.minecraft.command.ICommandSender sender,
java.lang.String[] args)
addTabCompletionOptions in interface net.minecraft.command.ICommandaddTabCompletionOptions in class net.minecraft.command.CommandBase