Package org.spongepowered.api.event
Class EventContextKeys
java.lang.Object
org.spongepowered.api.event.EventContextKeys
Standard keys for use within
EventContext
s.-
Field Summary
Modifier and TypeFieldDescriptionstatic final EventContextKey<Audience>
Used during command execution, indicates theAudience
to send any messages to.static final EventContextKey<LocatableBlock>
Used when aWorld
block event is being processed.static final EventContextKey<LocatableBlock>
Used to queue a block event to be processed in aWorld
.static final EventContextKey<BlockSnapshot>
Used when anEntity
interacts with a block.static final EventContextKey<BlockSnapshot>
Used during command execution, indicates theBlockSnapshot
that is the target of the invocation.static final EventContextKey<String>
Represents the command string that was provided to the command processor.static final EventContextKey<UUID>
static final EventContextKey<DamageType>
Represents theDamageType
to an entity.static final EventContextKey<DismountType>
static final EventContextKey<Entity>
Represents the targetEntity
.static final EventContextKey<Player>
Represents a fake player responsible for an action.static final EventContextKey<ServerWorld>
Used when fire spreads to other blocks.static final EventContextKey<BlockSnapshot>
Used forChangeBlockEvent
to provide the originBlockSnapshot
that is doing the "growing".static final EventContextKey<Living>
static final EventContextKey<DamageSource>
Represents the lastDamageSource
to anEntity
.static final EventContextKey<ServerLocation>
Used during command execution, indicates theServerLocation
that the command is centered around.static final EventContextKey<MovementType>
Represents theMovementType
when an entity moves.static final EventContextKey<BlockSnapshot>
Represents the sourceBlockSnapshot
of a block notification.static final EventContextKey<UUID>
static final EventContextKey<ServerWorld>
Used when aBlockTypes.PISTON_HEAD
extends.static final EventContextKey<ServerWorld>
Used when aBlockTypes.PISTON_HEAD
retracts.static final EventContextKey<Player>
Represents aPlayer
.static final EventContextKey<ServerWorld>
Used when aPlayer
breaks a block.static final EventContextKey<ServerWorld>
Used when aPlayer
places a block.static final EventContextKey<org.spongepowered.plugin.PluginContainer>
Represents aPluginContainer
.static final EventContextKey<Portal>
Represents aPortal
.static final EventContextKey<ProjectileSource>
Represents aProjectileSource
.static final EventContextKey<Vector3d>
Represents a rotation as aVector3d
, for use with commands.static final EventContextKey<GameProfile>
Represents a simulatedPlayer
.static final EventContextKey<SpawnType>
Represents theSpawnType
of an entity spawn.static final EventContextKey<Subject>
Used during command invocation, indicates theSubject
that permission checks should be performed against.static final EventContextKey<HandType>
Represents aHandType
.static final EventContextKey<ItemStackSnapshot>
Represents anItemStackSnapshot
of used item.static final EventContextKey<ItemStackSnapshot>
Represents anItemStackSnapshot
of a weapon. -
Method Summary
-
Field Details
-
AUDIENCE
Used during command execution, indicates theAudience
to send any messages to. -
BLOCK_EVENT_PROCESS
Used when aWorld
block event is being processed. For example, a piston head retracting and extending. Note: This represents vanilla's block event. Note: This occurs at the end of a world tick afterBLOCK_EVENT_QUEUE
. -
BLOCK_EVENT_QUEUE
Used to queue a block event to be processed in aWorld
. For example, a piston will queue retract/extend movements using this event. Note: This represents vanilla's block event. -
BLOCK_HIT
Used when anEntity
interacts with a block. -
BLOCK_TARGET
Used during command execution, indicates theBlockSnapshot
that is the target of the invocation. -
COMMAND
Represents the command string that was provided to the command processor. -
CREATOR
-
DAMAGE_TYPE
Represents theDamageType
to an entity. -
DISMOUNT_TYPE
-
ENTITY_HIT
Represents the targetEntity
. Used when an entity, such as a Player, targets an entity via an interaction. -
FAKE_PLAYER
Represents a fake player responsible for an action. Note: This is normally only used with mods. -
FIRE_SPREAD
Used when fire spreads to other blocks. -
GROWTH_ORIGIN
Used forChangeBlockEvent
to provide the originBlockSnapshot
that is doing the "growing". This is likely useful to determine what is the origin withBlockTransaction.operation()
when theoperation
is ofOperations.GROWTH
. -
IGNITER
-
LAST_DAMAGE_SOURCE
Represents the lastDamageSource
to anEntity
. -
LOCATION
Used during command execution, indicates theServerLocation
that the command is centered around. -
MOVEMENT_TYPE
Represents theMovementType
when an entity moves. -
NEIGHBOR_NOTIFY_SOURCE
Represents the sourceBlockSnapshot
of a block notification. -
NOTIFIER
-
PISTON_EXTEND
Used when aBlockTypes.PISTON_HEAD
extends. -
PISTON_RETRACT
Used when aBlockTypes.PISTON_HEAD
retracts. -
PLAYER
Represents aPlayer
. -
PLAYER_BREAK
Used when aPlayer
breaks a block. -
PLAYER_PLACE
Used when aPlayer
places a block. -
PLUGIN
Represents aPluginContainer
. -
PORTAL
Represents aPortal
. -
PROJECTILE_SOURCE
Represents aProjectileSource
. -
ROTATION
Represents a rotation as aVector3d
, for use with commands. -
SIMULATED_PLAYER
Represents a simulatedPlayer
. -
SPAWN_TYPE
Represents theSpawnType
of an entity spawn. -
SUBJECT
Used during command invocation, indicates theSubject
that permission checks should be performed against. -
USED_HAND
Represents aHandType
. -
USED_ITEM
Represents anItemStackSnapshot
of used item. -
WEAPON
Represents anItemStackSnapshot
of a weapon.
-