Package org.spongepowered.api.event
Class EventContextKeys
- java.lang.Object
-
- org.spongepowered.api.event.EventContextKeys
-
public final class EventContextKeys extends Object
Standard keys for use withinEventContext
s.
-
-
Field Summary
Fields Modifier and Type Field Description static EventContextKey<Audience>
AUDIENCE
Used during command execution, indicates theAudience
to send any messages to.static EventContextKey<LocatableBlock>
BLOCK_EVENT_PROCESS
Used when aWorld
block event is being processed.static EventContextKey<LocatableBlock>
BLOCK_EVENT_QUEUE
Used to queue a block event to be processed in aWorld
.static EventContextKey<BlockSnapshot>
BLOCK_HIT
Used when anEntity
interacts with a block.static EventContextKey<BlockSnapshot>
BLOCK_TARGET
Used during command execution, indicates theBlockSnapshot
that is the target of the invocation.static EventContextKey<String>
COMMAND
Represents the command string that was provided to the command processor.static EventContextKey<UUID>
CREATOR
static EventContextKey<DamageType>
DAMAGE_TYPE
Represents theDamageType
to an entity.static EventContextKey<DismountType>
DISMOUNT_TYPE
static EventContextKey<Entity>
ENTITY_HIT
Represents the targetEntity
.static EventContextKey<Player>
FAKE_PLAYER
Represents a fake player responsible for an action.static EventContextKey<ServerWorld>
FIRE_SPREAD
Used when fire spreads to other blocks.static EventContextKey<BlockSnapshot>
GROWTH_ORIGIN
Used forChangeBlockEvent
to provide the originBlockSnapshot
that is doing the "growing".static EventContextKey<Living>
IGNITER
static EventContextKey<DamageSource>
LAST_DAMAGE_SOURCE
Represents the lastDamageSource
to anEntity
.static EventContextKey<ServerWorld>
LEAVES_DECAY
Deprecated.UseBlockTransaction.operation()
instead.static EventContextKey<ServerWorld>
LIQUID_BREAK
Deprecated.UseBlockTransaction.operation()
instead.static EventContextKey<ServerWorld>
LIQUID_FLOW
Deprecated.UseBlockTransaction.operation()
instead.static EventContextKey<ServerWorld>
LIQUID_MIX
Deprecated.UseBlockTransaction.operation()
instead.static EventContextKey<ServerLocation>
LOCATION
Used during command execution, indicates theServerLocation
that the command is centered around.static EventContextKey<MovementType>
MOVEMENT_TYPE
Represents theMovementType
when an entity moves.static EventContextKey<BlockSnapshot>
NEIGHBOR_NOTIFY_SOURCE
Represents the sourceBlockSnapshot
of a block notification.static EventContextKey<UUID>
NOTIFIER
static EventContextKey<ServerWorld>
PISTON_EXTEND
Used when aBlockTypes.PISTON_HEAD
extends.static EventContextKey<ServerWorld>
PISTON_RETRACT
Used when aBlockTypes.PISTON_HEAD
retracts.static EventContextKey<Player>
PLAYER
Represents aPlayer
.static EventContextKey<ServerWorld>
PLAYER_BREAK
Used when aPlayer
breaks a block.static EventContextKey<ServerWorld>
PLAYER_PLACE
Used when aPlayer
places a block.static EventContextKey<org.spongepowered.plugin.PluginContainer>
PLUGIN
Represents aPluginContainer
.static EventContextKey<Portal>
PORTAL
Represents aPortal
.static EventContextKey<ProjectileSource>
PROJECTILE_SOURCE
Represents aProjectileSource
.static EventContextKey<Vector3d>
ROTATION
Represents a rotation as aVector3d
, for use with commands.static EventContextKey<GameProfile>
SIMULATED_PLAYER
Represents a simulatedPlayer
.static EventContextKey<SpawnType>
SPAWN_TYPE
Represents theSpawnType
of an entity spawn.static EventContextKey<Subject>
SUBJECT
Used during command invocation, indicates theSubject
that permission checks should be performed against.static EventContextKey<HandType>
USED_HAND
Represents aHandType
.static EventContextKey<ItemStackSnapshot>
USED_ITEM
Represents anItemStackSnapshot
of used item.static EventContextKey<ItemStackSnapshot>
WEAPON
Represents anItemStackSnapshot
of a weapon.
-
-
-
Field Detail
-
AUDIENCE
public static final EventContextKey<Audience> AUDIENCE
Used during command execution, indicates theAudience
to send any messages to.
-
BLOCK_EVENT_PROCESS
public static final EventContextKey<LocatableBlock> 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
public static final EventContextKey<LocatableBlock> 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
public static final EventContextKey<BlockSnapshot> BLOCK_HIT
Used when anEntity
interacts with a block.
-
BLOCK_TARGET
public static final EventContextKey<BlockSnapshot> BLOCK_TARGET
Used during command execution, indicates theBlockSnapshot
that is the target of the invocation.
-
COMMAND
public static final EventContextKey<String> COMMAND
Represents the command string that was provided to the command processor.
-
CREATOR
public static final EventContextKey<UUID> CREATOR
-
DAMAGE_TYPE
public static final EventContextKey<DamageType> DAMAGE_TYPE
Represents theDamageType
to an entity.
-
DISMOUNT_TYPE
public static final EventContextKey<DismountType> DISMOUNT_TYPE
-
ENTITY_HIT
public static final EventContextKey<Entity> ENTITY_HIT
Represents the targetEntity
. Used when an entity, such as a Player, targets an entity via an interaction.
-
FAKE_PLAYER
public static final EventContextKey<Player> FAKE_PLAYER
Represents a fake player responsible for an action. Note: This is normally only used with mods.
-
FIRE_SPREAD
public static final EventContextKey<ServerWorld> FIRE_SPREAD
Used when fire spreads to other blocks.
-
GROWTH_ORIGIN
public static final EventContextKey<BlockSnapshot> 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
public static final EventContextKey<Living> IGNITER
-
LAST_DAMAGE_SOURCE
public static final EventContextKey<DamageSource> LAST_DAMAGE_SOURCE
Represents the lastDamageSource
to anEntity
.
-
LEAVES_DECAY
public static final EventContextKey<ServerWorld> LEAVES_DECAY
Deprecated.UseBlockTransaction.operation()
instead.Used when leaves decay.
-
LIQUID_BREAK
public static final EventContextKey<ServerWorld> LIQUID_BREAK
Deprecated.UseBlockTransaction.operation()
instead.Used when flowing liquid causing another block to break.
-
LIQUID_FLOW
public static final EventContextKey<ServerWorld> LIQUID_FLOW
Deprecated.UseBlockTransaction.operation()
instead.Used when flowing liquid moves to another location.
-
LIQUID_MIX
public static final EventContextKey<ServerWorld> LIQUID_MIX
Deprecated.UseBlockTransaction.operation()
instead.Used when liquid changes state.
-
LOCATION
public static final EventContextKey<ServerLocation> LOCATION
Used during command execution, indicates theServerLocation
that the command is centered around.
-
MOVEMENT_TYPE
public static final EventContextKey<MovementType> MOVEMENT_TYPE
Represents theMovementType
when an entity moves.
-
NEIGHBOR_NOTIFY_SOURCE
public static final EventContextKey<BlockSnapshot> NEIGHBOR_NOTIFY_SOURCE
Represents the sourceBlockSnapshot
of a block notification.
-
NOTIFIER
public static final EventContextKey<UUID> NOTIFIER
-
PISTON_EXTEND
public static final EventContextKey<ServerWorld> PISTON_EXTEND
Used when aBlockTypes.PISTON_HEAD
extends.
-
PISTON_RETRACT
public static final EventContextKey<ServerWorld> PISTON_RETRACT
Used when aBlockTypes.PISTON_HEAD
retracts.
-
PLAYER
public static final EventContextKey<Player> PLAYER
Represents aPlayer
.
-
PLAYER_BREAK
public static final EventContextKey<ServerWorld> PLAYER_BREAK
Used when aPlayer
breaks a block.
-
PLAYER_PLACE
public static final EventContextKey<ServerWorld> PLAYER_PLACE
Used when aPlayer
places a block.
-
PLUGIN
public static final EventContextKey<org.spongepowered.plugin.PluginContainer> PLUGIN
Represents aPluginContainer
.
-
PORTAL
public static final EventContextKey<Portal> PORTAL
Represents aPortal
.
-
PROJECTILE_SOURCE
public static final EventContextKey<ProjectileSource> PROJECTILE_SOURCE
Represents aProjectileSource
.
-
ROTATION
public static final EventContextKey<Vector3d> ROTATION
Represents a rotation as aVector3d
, for use with commands.
-
SIMULATED_PLAYER
public static final EventContextKey<GameProfile> SIMULATED_PLAYER
Represents a simulatedPlayer
.
-
SPAWN_TYPE
public static final EventContextKey<SpawnType> SPAWN_TYPE
Represents theSpawnType
of an entity spawn.
-
SUBJECT
public static final EventContextKey<Subject> SUBJECT
Used during command invocation, indicates theSubject
that permission checks should be performed against.
-
USED_HAND
public static final EventContextKey<HandType> USED_HAND
Represents aHandType
.
-
USED_ITEM
public static final EventContextKey<ItemStackSnapshot> USED_ITEM
Represents anItemStackSnapshot
of used item.
-
WEAPON
public static final EventContextKey<ItemStackSnapshot> WEAPON
Represents anItemStackSnapshot
of a weapon.
-
-