Class ResourceKeyedValueParameters
parameters
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final DefaultedRegistryReference<ResourceKeyedValueParameter<BigDecimal>>
Require an argument to be aBigDecimal
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<BigInteger>>
Require an argument to be aBigInteger
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<BlockState>>
Requires an argument to represent aBlockState
static final DefaultedRegistryReference<ResourceKeyedValueParameter<Boolean>>
Require an argument to be a boolean.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Color>>
Require an argument to be aColor
static final DefaultedRegistryReference<ResourceKeyedValueParameter<DataContainer>>
Requires an argument to be a HOCON or JSON representation of aDataContainer
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<LocalDateTime>>
Expect an argument to be a date-time, in the form of aLocalDateTime
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Double>>
Require an argument to be an double-precision floating point number.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Duration>>
Require an argument to be a duration.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Entity>>
Require an argument to select oneEntity
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<GameProfile>>
Expect an argument to represent aGameProfile
of a user.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Integer>>
Require an argument to be an integer (base 10) number.static final DefaultedRegistryReference<ResourceKeyedValueParameter<InetAddress>>
Require an argument to be an IP address.Require an argument to represent an item.static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerLocation>>
Expect an argument to represent aServerLocation
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Long>>
Require an argument to be a long (base 10).static final DefaultedRegistryReference<ResourceKeyedValueParameter<List<Entity>>>
Require an argument to select manyentities
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Collection<GameProfile>>>
Expect an argument to represent aGameProfile
of a user.static final DefaultedRegistryReference<ResourceKeyedValueParameter<List<ServerPlayer>>>
Require an argument to select manyplayers
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Void>>
Does not parse any arguments, returning nothing.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Operator>>
Expect an argument to represent anOperator
static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerPlayer>>
Expect an argument to represent an online player.static final DefaultedRegistryReference<ResourceKeyedValueParameter<org.spongepowered.plugin.PluginContainer>>
Expect an argument to represent aPluginContainer
's id.static final DefaultedRegistryReference<ResourceKeyedValueParameter<String>>
Require one or more strings, without any processing, which are combined into a single, space-separated string.static final DefaultedRegistryReference<ResourceKeyedValueParameter<ResourceKey>>
Require an argument to be a namespacedResourceKey
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Vector3d>>
Require an argument to be aVector3d
, where any relative value (i.e.static final DefaultedRegistryReference<ResourceKeyedValueParameter<String>>
Require an argument to be a string.static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerLocation>>
Does not parse any arguments, but instead returns aServerLocation
if the current root of theCause
is targeting (looking at) a non-air block.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Entity>>
static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerPlayer>>
Does not parse any arguments, but instead returns aServerPlayer
if the current root of theCause
is as such (which thus must be aLocatable
).static final DefaultedRegistryReference<ResourceKeyedValueParameter<Component>>
Expects an argument to represent someComponent
serialised using formatting codes.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Component>>
Expects an argument to represent someComponent
serialised using formatting codes.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Component>>
Expects an argument to represent someComponent
serialised using Json.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Component>>
Expects an argument to represent someComponent
serialised using Json.static final DefaultedRegistryReference<ResourceKeyedValueParameter<URL>>
Require an argument to be a URL.static final DefaultedRegistryReference<ResourceKeyedValueParameter<UUID>>
Expect an argument to represent the UUID of a player who has been online at some point - that is, aUUID
where either: The player is online; or The user with the returnedUUID
has user data available in theUserManager
(that is, for this UUID,UserManager.exists(java.util.UUID)
will returntrue
).static final DefaultedRegistryReference<ResourceKeyedValueParameter<UUID>>
Expect an argument to represent aUUID
static final DefaultedRegistryReference<ResourceKeyedValueParameter<Vector2d>>
Expect an argument to represent aVector2d
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<Vector3d>>
Expect an argument to represent aVector3d
.static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerWorld>>
-
Method Summary
-
Field Details
-
BIG_DECIMAL
Require an argument to be aBigDecimal
.Returns a
BigDecimal
. -
BIG_INTEGER
Require an argument to be aBigInteger
.Returns a
BigInteger
. -
BLOCK_STATE
Requires an argument to represent aBlockState
Returns a
BlockState
-
BOOLEAN
Require an argument to be a boolean.Returns a
Boolean
. -
COLOR
Require an argument to be aColor
There are three types of input that may be used with this element:
- An inbuilt named color, as seen in the
Color
class - A comma separated set of RGB values, each of which ranges from 0 to 255 (eg. "125,3,75" for the red, green and blue components, respectively)
- A hex value, which must be prefixed with "#" or "0x"
Returns a
Color
- An inbuilt named color, as seen in the
-
DATA_CONTAINER
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<DataContainer>> DATA_CONTAINERRequires an argument to be a HOCON or JSON representation of aDataContainer
.Note that this parameter will consume all arguments, thus, this should be put at the end of a parameter chain.
Returns a
DataContainer
-
DATE_TIME
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<LocalDateTime>> DATE_TIMEExpect an argument to be a date-time, in the form of aLocalDateTime
. If no date is specified,LocalDate.now()
is used; if no time is specified,LocalTime.MIDNIGHT
is used.Date-times are expected in the ISO-8601 format.
Returns a
LocalDateTime
-
DOUBLE
Require an argument to be an double-precision floating point number.Returns a
Double
. -
DURATION
Require an argument to be a duration.The duration can be specified in one of these ways:
- A number, which will be assumed to be seconds.
- An element of the form
D:HH:MM:SS
- days and hours can be omitted. - An element of the form
[weeks]w[days]d[hours]h[minutes]m[seconds]s[millis]ms
, where any zeroed unit can be omitted.
Returns a
Duration
. -
ENTITY
-
GAME_PROFILE
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<GameProfile>> GAME_PROFILEExpect an argument to represent aGameProfile
of a user.Returns a
GameProfile
. -
INTEGER
Require an argument to be an integer (base 10) number.Returns an
Integer
. -
IP
Require an argument to be an IP address.Returns an
InetAddress
. -
ITEM_STACK_SNAPSHOT
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<ItemStackSnapshot>> ITEM_STACK_SNAPSHOTRequire an argument to represent an item.Returns a
ItemStackSnapshot
with a quantity of 1. -
LOCATION
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerLocation>> LOCATIONExpect an argument to represent aServerLocation
.Returns a
ServerLocation
. -
LONG
Require an argument to be a long (base 10).Returns a
Long
. -
MANY_ENTITIES
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<List<Entity>>> MANY_ENTITIESRequire an argument to select manyentities
.This parameter accepts selectors.
Returns many
Entity
objects.- See Also:
-
MANY_GAME_PROFILES
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<Collection<GameProfile>>> MANY_GAME_PROFILESExpect an argument to represent aGameProfile
of a user.This parameter accepts selectors (to obtain the game profiles of online players). As a result, this may return multiple profiles.
Returns a
GameProfile
. -
MANY_PLAYERS
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<List<ServerPlayer>>> MANY_PLAYERSRequire an argument to select manyplayers
.This parameter accepts selectors.
Returns many
Player
objects.- See Also:
-
NONE
Does not parse any arguments, returning nothing.Returns nothing - no entry will be placed into any provided key.
-
OPERATOR
-
PLAYER
Expect an argument to represent an online player.This parameter accepts selectors.
Returns a
ServerPlayer
. -
PLUGIN
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<org.spongepowered.plugin.PluginContainer>> PLUGINExpect an argument to represent aPluginContainer
's id.Returns a
PluginContainer
-
REMAINING_JOINED_STRINGS
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<String>> REMAINING_JOINED_STRINGSRequire one or more strings, without any processing, which are combined into a single, space-separated string.Returns a
String
. -
RESOURCE_KEY
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<ResourceKey>> RESOURCE_KEYRequire an argument to be a namespacedResourceKey
.Returns a
ResourceKey
-
ROTATION
Require an argument to be aVector3d
, where any relative value (i.e. anything specified using tilde (~) notation) will be based on the invoker's current rotation.The supplied
Vector2d
will contain the Euler components (yaw, pitch, roll), where:- the angles are specified in degrees;
- (0, 0) is looking directly south, parallel to the x-z plane;
- the yaw is measured as the angle counter-clockwise from due south in the x-z plane; and
- the pitch is negative when rotating up from the x-z plane.
- the roll is zero
This is presented as a
Vector3d
even though only two arguments are parsed for consistency withEntity.rotation()
. -
STRING
Require an argument to be a string.Returns a
String
. -
TARGET_BLOCK
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerLocation>> TARGET_BLOCKDoes not parse any arguments, but instead returns aServerLocation
if the current root of theCause
is targeting (looking at) a non-air block.This will always fail for non-locatable sources
Returns a
ServerLocation
. -
TARGET_ENTITY
-
TARGET_PLAYER
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<ServerPlayer>> TARGET_PLAYERDoes not parse any arguments, but instead returns aServerPlayer
if the current root of theCause
is as such (which thus must be aLocatable
).This will always fail for non-locatable sources
Returns a
ServerPlayer
. -
TEXT_FORMATTING_CODE
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<Component>> TEXT_FORMATTING_CODE -
TEXT_FORMATTING_CODE_ALL
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<Component>> TEXT_FORMATTING_CODE_ALL -
TEXT_JSON
-
TEXT_JSON_ALL
public static final DefaultedRegistryReference<ResourceKeyedValueParameter<Component>> TEXT_JSON_ALL -
URL
Require an argument to be a URL.Returns a
URL
-
USER
Expect an argument to represent the UUID of a player who has been online at some point - that is, aUUID
where either:- The player is online; or
- The user with the returned
UUID
has user data available in theUserManager
(that is, for this UUID,UserManager.exists(java.util.UUID)
will returntrue
).
As
User
objects are potentially slow to load, they are not created or returned here. In general, you will want to runUserManager.load(java.util.UUID)
on the returned UUID to actually obtain the user.This parameter accepts selectors (to obtain players).
Returns a
UUID
. -
UUID
-
VECTOR2D
-
VECTOR3D
-
WORLD
-
-
Method Details
-
registry
-