Package org.spongepowered.api.event
Class EventContextKeys
- java.lang.Object
-
- org.spongepowered.api.event.EventContextKeys
-
public final class EventContextKeys extends java.lang.ObjectStandard keys for use withinEventContexts.
-
-
Field Summary
Fields Modifier and Type Field Description static EventContextKey<Audience>AUDIENCEUsed during command execution, indicates theAudienceto send any messages to.static EventContextKey<LocatableBlock>BLOCK_EVENT_PROCESSUsed when aWorldblock event is being processed.static EventContextKey<LocatableBlock>BLOCK_EVENT_QUEUEUsed to queue a block event to be processed in aWorld.static EventContextKey<BlockSnapshot>BLOCK_HITUsed when anEntityinteracts with a block.static EventContextKey<BlockSnapshot>BLOCK_TARGETUsed during command execution, indicates theBlockSnapshotthat is the target of the invocation.static EventContextKey<java.lang.String>COMMANDRepresents the command string that was provided to the command processor.static EventContextKey<java.util.UUID>CREATORstatic EventContextKey<DamageType>DAMAGE_TYPERepresents theDamageTypeto an entity.static EventContextKey<DismountType>DISMOUNT_TYPEstatic EventContextKey<Entity>ENTITY_HITRepresents the targetEntity.static EventContextKey<Player>FAKE_PLAYERRepresents a fake player responsible for an action.static EventContextKey<ServerWorld>FIRE_SPREADUsed when fire spreads to other blocks.static EventContextKey<BlockSnapshot>GROWTH_ORIGINUsed forChangeBlockEventto provide the originBlockSnapshotthat is doing the "growing".static EventContextKey<Living>IGNITERstatic EventContextKey<DamageSource>LAST_DAMAGE_SOURCERepresents the lastDamageSourceto anEntity.static EventContextKey<ServerWorld>LEAVES_DECAYDeprecated.UseBlockTransaction.operation()instead.static EventContextKey<ServerWorld>LIQUID_BREAKDeprecated.UseBlockTransaction.operation()instead.static EventContextKey<ServerWorld>LIQUID_FLOWDeprecated.UseBlockTransaction.operation()instead.static EventContextKey<ServerWorld>LIQUID_MIXDeprecated.UseBlockTransaction.operation()instead.static EventContextKey<ServerLocation>LOCATIONUsed during command execution, indicates theServerLocationthat the command is centered around.static EventContextKey<MovementType>MOVEMENT_TYPERepresents theMovementTypewhen an entity moves.static EventContextKey<BlockSnapshot>NEIGHBOR_NOTIFY_SOURCERepresents the sourceBlockSnapshotof a block notification.static EventContextKey<java.util.UUID>NOTIFIERRepresents theUUIDof aUserthat notified a block.static EventContextKey<ServerWorld>PISTON_EXTENDUsed when aBlockTypes.PISTON_HEADextends.static EventContextKey<ServerWorld>PISTON_RETRACTUsed when aBlockTypes.PISTON_HEADretracts.static EventContextKey<Player>PLAYERRepresents aPlayer.static EventContextKey<ServerWorld>PLAYER_BREAKUsed when aPlayerbreaks a block.static EventContextKey<ServerWorld>PLAYER_PLACEUsed when aPlayerplaces a block.static EventContextKey<org.spongepowered.plugin.PluginContainer>PLUGINRepresents aPluginContainer.static EventContextKey<Portal>PORTALRepresents aPortal.static EventContextKey<ProjectileSource>PROJECTILE_SOURCERepresents aProjectileSource.static EventContextKey<Vector3d>ROTATIONRepresents a rotation as aVector3d, for use with commands.static EventContextKey<GameProfile>SIMULATED_PLAYERRepresents a simulatedPlayer.static EventContextKey<SpawnType>SPAWN_TYPERepresents theSpawnTypeof an entity spawn.static EventContextKey<Subject>SUBJECTUsed during command invocation, indicates theSubjectthat permission checks should be performed against.static EventContextKey<HandType>USED_HANDRepresents aHandType.static EventContextKey<ItemStackSnapshot>USED_ITEMRepresents anItemStackSnapshotof used item.static EventContextKey<ItemStackSnapshot>WEAPONRepresents anItemStackSnapshotof a weapon.
-
-
-
Field Detail
-
AUDIENCE
public static final EventContextKey<Audience> AUDIENCE
Used during command execution, indicates theAudienceto send any messages to.
-
BLOCK_EVENT_PROCESS
public static final EventContextKey<LocatableBlock> 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
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 anEntityinteracts with a block.
-
BLOCK_TARGET
public static final EventContextKey<BlockSnapshot> BLOCK_TARGET
Used during command execution, indicates theBlockSnapshotthat is the target of the invocation.
-
COMMAND
public static final EventContextKey<java.lang.String> COMMAND
Represents the command string that was provided to the command processor.
-
CREATOR
public static final EventContextKey<java.util.UUID> CREATOR
-
DAMAGE_TYPE
public static final EventContextKey<DamageType> DAMAGE_TYPE
Represents theDamageTypeto 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 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
public static final EventContextKey<Living> IGNITER
-
LAST_DAMAGE_SOURCE
public static final EventContextKey<DamageSource> LAST_DAMAGE_SOURCE
Represents the lastDamageSourceto anEntity.
-
LEAVES_DECAY
@Deprecated public static final EventContextKey<ServerWorld> LEAVES_DECAY
Deprecated.UseBlockTransaction.operation()instead.Used when leaves decay.
-
LIQUID_BREAK
@Deprecated public static final EventContextKey<ServerWorld> LIQUID_BREAK
Deprecated.UseBlockTransaction.operation()instead.Used when flowing liquid causing another block to break.
-
LIQUID_FLOW
@Deprecated public static final EventContextKey<ServerWorld> LIQUID_FLOW
Deprecated.UseBlockTransaction.operation()instead.Used when flowing liquid moves to another location.
-
LIQUID_MIX
@Deprecated 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 theServerLocationthat the command is centered around.
-
MOVEMENT_TYPE
public static final EventContextKey<MovementType> MOVEMENT_TYPE
Represents theMovementTypewhen an entity moves.
-
NEIGHBOR_NOTIFY_SOURCE
public static final EventContextKey<BlockSnapshot> NEIGHBOR_NOTIFY_SOURCE
Represents the sourceBlockSnapshotof a block notification.
-
NOTIFIER
public static final EventContextKey<java.util.UUID> NOTIFIER
Represents theUUIDof aUserthat notified a block.
-
PISTON_EXTEND
public static final EventContextKey<ServerWorld> PISTON_EXTEND
Used when aBlockTypes.PISTON_HEADextends.
-
PISTON_RETRACT
public static final EventContextKey<ServerWorld> PISTON_RETRACT
Used when aBlockTypes.PISTON_HEADretracts.
-
PLAYER
public static final EventContextKey<Player> PLAYER
Represents aPlayer.
-
PLAYER_BREAK
public static final EventContextKey<ServerWorld> PLAYER_BREAK
Used when aPlayerbreaks a block.
-
PLAYER_PLACE
public static final EventContextKey<ServerWorld> PLAYER_PLACE
Used when aPlayerplaces 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 theSpawnTypeof an entity spawn.
-
SUBJECT
public static final EventContextKey<Subject> SUBJECT
Used during command invocation, indicates theSubjectthat 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 anItemStackSnapshotof used item.
-
WEAPON
public static final EventContextKey<ItemStackSnapshot> WEAPON
Represents anItemStackSnapshotof a weapon.
-
-