Package org.spongepowered.api.event
Class EventContextKeys
java.lang.Object
org.spongepowered.api.event.EventContextKeys
Standard keys for use within
EventContexts.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventContextKey<Audience>Used during command execution, indicates theAudienceto send any messages to.static final EventContextKey<LocatableBlock>Used when aWorldblock 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 anEntityinteracts with a block.static final EventContextKey<BlockSnapshot>Used during command execution, indicates theBlockSnapshotthat 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 theDamageTypeto 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 forChangeBlockEventto provide the originBlockSnapshotthat is doing the "growing".static final EventContextKey<Living>static final EventContextKey<DamageSource>Represents the lastDamageSourceto anEntity.static final EventContextKey<ServerLocation>Used during command execution, indicates theServerLocationthat the command is centered around.static final EventContextKey<MovementType>Represents theMovementTypewhen an entity moves.static final EventContextKey<BlockSnapshot>Represents the sourceBlockSnapshotof a block notification.static final EventContextKey<UUID>static final EventContextKey<ServerWorld>Used when aBlockTypes.PISTON_HEADextends.static final EventContextKey<ServerWorld>Used when aBlockTypes.PISTON_HEADretracts.static final EventContextKey<Player>Represents aPlayer.static final EventContextKey<ServerWorld>Used when aPlayerbreaks a block.static final EventContextKey<ServerWorld>Used when aPlayerplaces 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 theSpawnTypeof an entity spawn.static final EventContextKey<Subject>Used during command invocation, indicates theSubjectthat permission checks should be performed against.static final EventContextKey<HandType>Represents aHandType.static final EventContextKey<ItemStackSnapshot>Represents anItemStackSnapshotof used item.static final EventContextKey<ItemStackSnapshot>Represents anItemStackSnapshotof a weapon. -
Method Summary
-
Field Details
-
AUDIENCE
Used during command execution, indicates theAudienceto send any messages to. -
BLOCK_EVENT_PROCESS
Used when aWorldblock 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 anEntityinteracts with a block. -
BLOCK_TARGET
Used during command execution, indicates theBlockSnapshotthat is the target of the invocation. -
COMMAND
Represents the command string that was provided to the command processor. -
CREATOR
-
DAMAGE_TYPE
Represents theDamageTypeto 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 forChangeBlockEventto provide the originBlockSnapshotthat is doing the "growing". This is likely useful to determine what is the origin withBlockTransaction.operation()when theoperationis ofOperations.GROWTH. -
IGNITER
-
LAST_DAMAGE_SOURCE
Represents the lastDamageSourceto anEntity. -
LOCATION
Used during command execution, indicates theServerLocationthat the command is centered around. -
MOVEMENT_TYPE
Represents theMovementTypewhen an entity moves. -
NEIGHBOR_NOTIFY_SOURCE
Represents the sourceBlockSnapshotof a block notification. -
NOTIFIER
-
PISTON_EXTEND
Used when aBlockTypes.PISTON_HEADextends. -
PISTON_RETRACT
Used when aBlockTypes.PISTON_HEADretracts. -
PLAYER
Represents aPlayer. -
PLAYER_BREAK
Used when aPlayerbreaks a block. -
PLAYER_PLACE
Used when aPlayerplaces 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 theSpawnTypeof an entity spawn. -
SUBJECT
Used during command invocation, indicates theSubjectthat permission checks should be performed against. -
USED_HAND
Represents aHandType. -
USED_ITEM
Represents anItemStackSnapshotof used item. -
WEAPON
Represents anItemStackSnapshotof a weapon.
-