T - The type of the argumentpublic interface ArgumentType<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
ArgumentType.EnumArgumentType<T extends Enum<T>>
Represents a custom
ArgumentType that parses to an enum value |
static class |
ArgumentType.FilteredEnumArgumentType<T extends Enum<T>>
Represents a custom
ArgumentType that parses to a filtered enum |
| Modifier and Type | Field and Description |
|---|---|
static ArgumentType<org.bukkit.Material> |
BLOCK
ArgumentType that represents a material where Material.isBlock() is true |
static ArgumentType<Boolean> |
BOOLEAN
ArgumentType that represents a boolean |
static ArgumentType<Command> |
COMMAND
ArgumentType that represents a CommandCore command |
static ArgumentType<Double> |
DOUBLE
ArgumentType that represents a double |
static ArgumentType<org.bukkit.entity.EntityType> |
ENTITY
ArgumentType that represents an entity |
static ArgumentType<Integer> |
INTEGER
ArgumentType that represents an integer |
static ArgumentType<org.bukkit.Material> |
ITEM
ArgumentType that represents a material where Material.isItem() is true |
static ArgumentType<org.bukkit.entity.EntityType> |
LIVING_ENTITY
ArgumentType that represents an entity that is living |
static ArgumentType<org.bukkit.loot.LootTable> |
LOOT_TABLE
ArgumentType that represents a loot table |
static ArgumentType<org.bukkit.Material> |
MATERIAL
ArgumentType that represents a material |
static ArgumentType<String> |
NAME
ArgumentType that represents the name of something. |
static ArgumentType<Integer> |
NATURAL_NUMBER
ArgumentType that represents an integer that is no smaller than 1 |
static ArgumentType<org.bukkit.entity.Player> |
PLAYER
ArgumentType that represents a player |
static ArgumentType<org.bukkit.entity.EntityType> |
SPAWNABLE_ENTITY
ArgumentType that represents an entity that can be spawned using RegionAccessor.spawnEntity(Location, EntityType). |
static ArgumentType<UUID> |
UUID
ArgumentType that represents a UUID |
static ArgumentType<org.bukkit.util.Vector> |
VECTOR
ArgumentType that represents a vector |
static ArgumentType<String> |
WORD
ArgumentType that is just a single word |
static ArgumentType<org.bukkit.World> |
WORLD
ArgumentType that represents a loaded world |
| Modifier and Type | Method and Description |
|---|---|
default @NotNull List<String> |
getTabComplete(@NotNull CommandContext context)
Gets the tabcomplete for this
ArgumentType |
@NotNull com.datasiqn.resultapi.Result<T,String> |
parse(@NotNull ArgumentReader reader)
Attempts to parse an
ArgumentReader. |
static @NotNull ArgumentType<Integer> |
rangedInt(int min)
Creates an
ArgumentType that represents an integer with a minimum value (inclusive) |
static @NotNull ArgumentType<Integer> |
rangedInt(int min,
int max)
Creates an
ArgumentType that represents an integer with a minimum (inclusive) and maximum (inclusive) value |
static final ArgumentType<String> WORD
ArgumentType that is just a single wordstatic final ArgumentType<String> NAME
ArgumentType that represents the name of something. Can have multiple spaces in the namestatic final ArgumentType<Integer> INTEGER
ArgumentType that represents an integerstatic final ArgumentType<Integer> NATURAL_NUMBER
ArgumentType that represents an integer that is no smaller than 1static final ArgumentType<Double> DOUBLE
ArgumentType that represents a doublestatic final ArgumentType<Boolean> BOOLEAN
ArgumentType that represents a booleanstatic final ArgumentType<UUID> UUID
ArgumentType that represents a UUIDstatic final ArgumentType<org.bukkit.util.Vector> VECTOR
ArgumentType that represents a vectorstatic final ArgumentType<org.bukkit.World> WORLD
ArgumentType that represents a loaded worldstatic final ArgumentType<org.bukkit.entity.EntityType> ENTITY
ArgumentType that represents an entitystatic final ArgumentType<org.bukkit.entity.EntityType> LIVING_ENTITY
ArgumentType that represents an entity that is livingstatic final ArgumentType<org.bukkit.entity.EntityType> SPAWNABLE_ENTITY
ArgumentType that represents an entity that can be spawned using RegionAccessor.spawnEntity(Location, EntityType).
ENTITY argument type, except that this omits the Player entity typestatic final ArgumentType<org.bukkit.loot.LootTable> LOOT_TABLE
ArgumentType that represents a loot tablestatic final ArgumentType<org.bukkit.Material> MATERIAL
ArgumentType that represents a materialstatic final ArgumentType<org.bukkit.Material> BLOCK
ArgumentType that represents a material where Material.isBlock() is truestatic final ArgumentType<org.bukkit.Material> ITEM
ArgumentType that represents a material where Material.isItem() is truestatic final ArgumentType<org.bukkit.entity.Player> PLAYER
ArgumentType that represents a playerstatic final ArgumentType<Command> COMMAND
ArgumentType that represents a CommandCore command@Contract(value="_ -> new") @NotNull static @NotNull ArgumentType<Integer> rangedInt(int min)
ArgumentType that represents an integer with a minimum value (inclusive)min - The inclusive minimum valueArgumentType@Contract(value="_, _ -> new") @NotNull static @NotNull ArgumentType<Integer> rangedInt(int min, int max)
ArgumentType that represents an integer with a minimum (inclusive) and maximum (inclusive) valuemin - The inclusive minimum valuemax - The inclusive maximum valueArgumentType@NotNull @NotNull com.datasiqn.resultapi.Result<T,String> parse(@NotNull @NotNull ArgumentReader reader)
ArgumentReader.
After parsing, the reader will always be on the space of the next argument, or the end of the readerreader - The reader to parse@NotNull default @NotNull List<String> getTabComplete(@NotNull @NotNull CommandContext context)
ArgumentTypecontext - The command contextCopyright © 2024. All rights reserved.