T - The type of the enumpublic static class ArgumentType.EnumArgumentType<T extends Enum<T>> extends Object implements SimpleArgumentType<T>
ArgumentType that parses to an enum valueArgumentType.EnumArgumentType<T extends Enum<T>>, ArgumentType.FilteredEnumArgumentType<T extends Enum<T>>BLOCK, BOOLEAN, COMMAND, DOUBLE, ENTITY, INTEGER, ITEM, LIVING_ENTITY, LOOT_TABLE, MATERIAL, NAME, NATURAL_NUMBER, PLAYER, SPAWNABLE_ENTITY, UUID, VECTOR, WORD, WORLD| Constructor and Description |
|---|
EnumArgumentType(@NotNull Class<T> enumClass)
Creates a new
ArgumentType |
EnumArgumentType(@NotNull Class<T> enumClass,
@NotNull String enumName)
Creates a new
ArgumentType |
| Modifier and Type | Method and Description |
|---|---|
@NotNull List<String> |
getTabComplete(@NotNull CommandContext context)
Gets the tabcomplete for this
ArgumentType |
@NotNull String |
getTypeName()
Gets the argument type name
|
@NotNull com.datasiqn.resultapi.Result<T,com.datasiqn.resultapi.None> |
parseWord(String word)
Parses just a single word
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparserangedInt, rangedIntpublic EnumArgumentType(@NotNull
@NotNull Class<T> enumClass)
ArgumentTypeenumClass - The enum's class@NotNull public @NotNull String getTypeName()
SimpleArgumentTypegetTypeName in interface SimpleArgumentType<T extends Enum<T>>@NotNull public @NotNull com.datasiqn.resultapi.Result<T,com.datasiqn.resultapi.None> parseWord(String word)
SimpleArgumentTypeparseWord in interface SimpleArgumentType<T extends Enum<T>>word - The wordResult containing the parsed value@NotNull public @NotNull List<String> getTabComplete(@NotNull @NotNull CommandContext context)
ArgumentTypeArgumentTypegetTabComplete in interface ArgumentType<T extends Enum<T>>context - The command contextCopyright © 2024. All rights reserved.