public final class ArgumentTypes extends Object
ArgumentType
s available in Vanilla Minecraft.Modifier and Type | Field and Description |
---|---|
static ArgumentType<Integer> |
COUNT
The argument type limiting the number of results of a
Selector . |
static ArgumentHolder.Vector3<com.flowpowered.math.vector.Vector3i,Integer> |
DIMENSION
The argument type filtering targets which aren't in the specified volume.
|
static ArgumentType.Invertible<EntityType> |
ENTITY_TYPE
The argument type filtering targets based on the
EntityType . |
static ArgumentType<GameMode> |
GAME_MODE
The argument type filtering based on the
GameMode of a player. |
static ArgumentHolder.Limit<ArgumentType<Integer>> |
LEVEL
The argument types filtering based on the number of experience levels of
the target.
|
static ArgumentType.Invertible<String> |
NAME
The argument type filtering based on the name of the target.
|
static ArgumentHolder.Vector3<com.flowpowered.math.vector.Vector3i,Integer> |
POSITION
The argument types representing the position of the selector.
|
static ArgumentHolder.Limit<ArgumentType<Integer>> |
RADIUS
The argument types representing the radius of the selector.
|
static ArgumentHolder.Limit<ArgumentHolder.Vector3<com.flowpowered.math.vector.Vector3d,Double>> |
ROTATION
The argument type filtering targets within a specific rotation range.
|
static ArgumentType.Invertible<String> |
TEAM
The argument type filtering based on the
Team of the target. |
Modifier and Type | Method and Description |
---|---|
static ArgumentType<String> |
create(String key)
Creates a custom
ArgumentType with the specified key. |
static <T> ArgumentType<T> |
create(String key,
Class<T> type)
Creates a custom
ArgumentType with the specified key and value. |
static ArgumentHolder.Limit<ArgumentType<Integer>> |
score(String name)
Creates a minimum and maximum
ArgumentType filtering depending on
the score of the specified objective. |
static Optional<ArgumentType<?>> |
valueOf(String name)
Gets the
ArgumentType with the provided name. |
static Collection<ArgumentType<?>> |
values()
Gets a
Collection of all possible ArgumentType s. |
public static final ArgumentHolder.Vector3<com.flowpowered.math.vector.Vector3i,Integer> POSITION
In Vanilla, this is represented by the x
, y
and
z
selector keys.
public static final ArgumentHolder.Limit<ArgumentType<Integer>> RADIUS
In Vanilla, this is represented by the r
(for minimum) and
rm
(for maximum) selector keys.
public static final ArgumentType<GameMode> GAME_MODE
GameMode
of a player.
In Vanilla, this is represented by the m
selector key.
Note that this element is of type ArgumentType.Invertible
.
public static final ArgumentType<Integer> COUNT
Selector
.
Negative values will reverse the order of targets - for example the
farthest targets will be returned first.
The default count for the SelectorTypes.RANDOM
and
SelectorTypes.NEAREST_PLAYER
is 1
, therefore a higher
number will increase the count instead of limiting it.
In Vanilla, this is represented by the c
selector key.
public static final ArgumentHolder.Limit<ArgumentType<Integer>> LEVEL
In Vanilla, this is represented by the l
(for maximum) and
lm
(for minimum) selector keys.
public static final ArgumentType.Invertible<String> TEAM
Team
of the target.
Inverting this argument type will search for all targets not on the
specified team instead.
In Vanilla, this is represented by the team
selector key with
the !
prefix for inverted values.
public static final ArgumentType.Invertible<String> NAME
In Vanilla, this is represented by the name
selector key with
the !
prefix for inverted values.
public static final ArgumentHolder.Vector3<com.flowpowered.math.vector.Vector3i,Integer> DIMENSION
In Vanilla, this is represented by the dx
, dy
and
dz
selector keys.
public static final ArgumentHolder.Limit<ArgumentHolder.Vector3<com.flowpowered.math.vector.Vector3d,Double>> ROTATION
public static final ArgumentType.Invertible<EntityType> ENTITY_TYPE
EntityType
.
In Vanilla, this is represented by the type
selector key.
public static ArgumentHolder.Limit<ArgumentType<Integer>> score(String name)
ArgumentType
filtering depending on
the score of the specified objective.name
- The objective name to usepublic static Optional<ArgumentType<?>> valueOf(String name)
ArgumentType
with the provided name.name
- The name of the argument typeArgumentType
with the given name or Optional.empty()
if not foundpublic static Collection<ArgumentType<?>> values()
Collection
of all possible ArgumentType
s.ArgumentType
spublic static ArgumentType<String> create(String key)
ArgumentType
with the specified key.key
- The key to use for the argumentpublic static <T> ArgumentType<T> create(String key, Class<T> type)
ArgumentType
with the specified key and value.T
- The argument's value typekey
- The key to use for the argumenttype
- The class of the argument's value type