Package studio.mevera.imperat.brigadier
Enum Class MinecraftArgumentType
- All Implemented Interfaces:
Serializable,Comparable<MinecraftArgumentType>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA block position (x, y, z).A block predicate.A block state.A chat color.A column position (x, z).A JSON Chat component.Represents an enchantment.Entity anchor (feet/eyes).A selector, player name, or UUID.A floating-point range.A player, online or not.An integer range.An item predicate.An item stack.An NBT value.A path within an NBT value.Represents a partial NBT tag.A single score criterion.A scoreboard operation.A particle effect.A potion effect.An Identifier.A rotation (yaw, pitch).A scoreboard objective.A scoreboard slot.A collection of up to 3 axes.Template mirror.Template rotation.Represents a UUID value.A 2D vector.A 3D vector. -
Method Summary
Modifier and TypeMethodDescription<T> @NotNull com.mojang.brigadier.arguments.ArgumentType<T><T> @NotNull Optional<com.mojang.brigadier.arguments.ArgumentType<T>>createIfPresent(Object... arguments) static void<T> @NotNull com.mojang.brigadier.arguments.ArgumentType<T>get()intReturns the number of raw input arguments this argument type consumes.<T> @NotNull Optional<com.mojang.brigadier.arguments.ArgumentType<T>><T> @Nullable Class<T>Returns the Class representing the type that this argument parses into.booleanChecks if this argument valueType is supported in this Minecraft versionbooleanChecks if this argument valueType requires parametersstatic MinecraftArgumentTypeReturns the enum constant of this class with the specified name.static MinecraftArgumentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ENTITY_SELECTOR
A selector, player name, or UUID. -
GAME_PROFILE
A player, online or not. -
COLOR
A chat color. -
COMPONENT
A JSON Chat component. -
NBT
An NBT value. -
NBT_TAG
Represents a partial NBT tag. -
NBT_PATH
A path within an NBT value. -
SCOREBOARD_OBJECTIVE
A scoreboard objective. -
OBJECTIVE_CRITERIA
A single score criterion. -
SCOREBOARD_SLOT
A scoreboard slot. -
OPERATION
A scoreboard operation. -
PARTICLE
A particle effect. -
RESOURCE_LOCATION
An Identifier. -
POTION_EFFECT
A potion effect. -
ENCHANTMENT
Represents an enchantment. -
UUID
Represents a UUID value. -
BLOCK_POS
A block position (x, y, z). -
COLUMN_POS
A column position (x, z). -
VECTOR_3
A 3D vector. -
VECTOR_2
A 2D vector. -
ROTATION
A rotation (yaw, pitch). -
SWIZZLE
A collection of up to 3 axes. -
BLOCK_STATE
A block state. -
BLOCK_PREDICATE
A block predicate. -
ITEM_STACK
An item stack. -
ITEM_PREDICATE
An item predicate. -
ENTITY_ANCHOR
Entity anchor (feet/eyes). -
INT_RANGE
An integer range. -
FLOAT_RANGE
A floating-point range. -
TEMPLATE_MIRROR
Template mirror. -
TEMPLATE_ROTATION
Template rotation.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
ensureSetup
public static void ensureSetup() -
getConsumedArgs
public int getConsumedArgs()Returns the number of raw input arguments this argument type consumes. -
getParsedType
Returns the Class representing the type that this argument parses into. For example, BLOCK_POS returns BlockPos.class, ENTITY returns EntitySelector.class, etc.- Type Parameters:
T- The expected type- Returns:
- The Class object, or null if not resolvable in current version
-
isSupported
public boolean isSupported()Checks if this argument valueType is supported in this Minecraft version -
requiresParameters
public boolean requiresParameters()Checks if this argument valueType requires parameters -
get
@NotNull public <T> @NotNull com.mojang.brigadier.arguments.ArgumentType<T> get() -
create
@NotNull public <T> @NotNull com.mojang.brigadier.arguments.ArgumentType<T> create(Object... arguments) -
getIfPresent
@NotNull public <T> @NotNull Optional<com.mojang.brigadier.arguments.ArgumentType<T>> getIfPresent() -
createIfPresent
-