public enum CommandHandler extends java.lang.Enum<CommandHandler>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
<T extends java.lang.Enum<T>> |
getEnumParser(java.lang.Class<T> enumClass)
Get an argument parser for the specific enum.
|
<T> IArgumentParser<T> |
getParserForType(java.lang.Class<T> type)
Get the argument parser for a specific type.
|
<T> void |
registerArgumentParser(java.lang.Class<T> type,
IArgumentParser<T> argumentParser)
Register an argument parser.
|
void |
registerCommand(net.minecraftforge.fml.common.event.FMLServerStartingEvent event,
Command command,
ICommandExecutor executor)
Registers the given command, must be called from FMLServerStartingEvent
|
static CommandHandler |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CommandHandler[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CommandHandler INSTANCE
public static CommandHandler[] values()
for (CommandHandler c : CommandHandler.values()) System.out.println(c);
public static CommandHandler valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic <T> void registerArgumentParser(java.lang.Class<T> type,
IArgumentParser<T> argumentParser)
T - the argument typetype - the argument typeargumentParser - the argument parserpublic <T extends java.lang.Enum<T>> IArgumentParser<T> getEnumParser(java.lang.Class<T> enumClass)
T - the enum typeenumClass - the enum classpublic <T> IArgumentParser<T> getParserForType(java.lang.Class<T> type)
T - the argument typetype - the argument typepublic void registerCommand(net.minecraftforge.fml.common.event.FMLServerStartingEvent event,
Command command,
ICommandExecutor executor)
event - the FMLServerStartingEventcommand - the command to registerexecutor - a CommandExecutor to execute this command