public final class EventContextKeys extends Object
EventContext
s.Modifier and Type | Field and Description |
---|---|
static EventContextKey<LocatableBlock> |
BLOCK_EVENT_PROCESS
Used when a
World block event is being processed. |
static EventContextKey<LocatableBlock> |
BLOCK_EVENT_QUEUE
Used to queue a block event to be processed in a
World . |
static EventContextKey<BlockSnapshot> |
BLOCK_HIT
Used when an
Entity interacts with a block. |
static EventContextKey<ChangeBlockEvent.Break> |
BREAK_EVENT
Used for
ChangeBlockEvent.Post to provide
the block event without relying on existing in the Cause stack. |
static EventContextKey<User> |
CREATOR
Represents the creator of an
Entity . |
static EventContextKey<DamageType> |
DAMAGE_TYPE
Represents the
DamageType to an entity. |
static EventContextKey<ChangeBlockEvent.Decay> |
DECAY_EVENT
Used for
ChangeBlockEvent.Post to provide
the block event without relying on existing in the Cause stack. |
static EventContextKey<DismountType> |
DISMOUNT_TYPE
|
static EventContextKey<Entity> |
ENTITY_HIT
Represents the target
Entity . |
static EventContextKey<Player> |
FAKE_PLAYER
Represents a fake player responsible for an action.
|
static EventContextKey<World> |
FIRE_SPREAD
Used when fire spreads to other blocks.
|
static EventContextKey<ChangeBlockEvent.Grow> |
GROW_EVENT
Used for
ChangeBlockEvent.Post to provide
the block event without relying on existing in the Cause stack. |
static EventContextKey<BlockSnapshot> |
GROWTH_ORIGIN
Used for
ChangeBlockEvent.Grow to provide
the origin BlockSnapshot that is doing the "growing". |
static EventContextKey<Living> |
IGNITER
|
static EventContextKey<DamageSource> |
LAST_DAMAGE_SOURCE
Represents the last
DamageSource to an Entity . |
static EventContextKey<World> |
LEAVES_DECAY
Used when leaves decay.
|
static EventContextKey<World> |
LIQUID_BREAK
Used when flowing liquid causing another block to break.
|
static EventContextKey<World> |
LIQUID_FLOW
Used when flowing liquid moves to another location.
|
static EventContextKey<World> |
LIQUID_MIX
Used when liquid changes state.
|
static EventContextKey<ChangeBlockEvent.Modify> |
MODIFY_EVENT
Used for
ChangeBlockEvent.Post to provide
the block event without relying on existing in the Cause stack. |
static EventContextKey<BlockSnapshot> |
NEIGHBOR_NOTIFY_SOURCE
Represents the source
BlockSnapshot of a block notification. |
static EventContextKey<User> |
NOTIFIER
Represents the
User that notified a block. |
static EventContextKey<User> |
OWNER
Represents the
User that owns a block. |
static EventContextKey<World> |
PISTON_EXTEND
Used when a
BlockTypes.PISTON_HEAD extends. |
static EventContextKey<World> |
PISTON_RETRACT
Used when a
BlockTypes.PISTON_HEAD retracts. |
static EventContextKey<ChangeBlockEvent.Place> |
PLACE_EVENT
Used for
ChangeBlockEvent.Post to provide
the block event without relying on existing in the Cause stack. |
static EventContextKey<Player> |
PLAYER
Represents a
Player . |
static EventContextKey<World> |
PLAYER_BREAK
Used when a
Player breaks a block. |
static EventContextKey<World> |
PLAYER_PLACE
Used when a
Player places a block. |
static EventContextKey<GameProfile> |
PLAYER_SIMULATED
Represents a simulated
Player . |
static EventContextKey<PluginContainer> |
PLUGIN
Represents a
PluginContainer . |
static EventContextKey<ProjectileSource> |
PROJECTILE_SOURCE
Represents a
ProjectileSource . |
static EventContextKey<ServiceManager> |
SERVICE_MANAGER
Represents the
ServiceManager . |
static EventContextKey<SpawnType> |
SPAWN_TYPE
Represents the
SpawnType of an entity spawn. |
static EventContextKey<TeleportType> |
TELEPORT_TYPE
Represents the
TeleportType when an entity teleports. |
static EventContextKey<ProjectileSource> |
THROWER
Deprecated.
this key is a duplicate of
PROJECTILE_SOURCE and
will be removed in API 8. See this
issue on SpongeAPI, Use PROJECTILE_SOURCE
instead. |
static EventContextKey<HandType> |
USED_HAND
Represents a
HandType . |
static EventContextKey<ItemStackSnapshot> |
USED_ITEM
Represents an
ItemStackSnapshot of used item. |
static EventContextKey<ItemStackSnapshot> |
WEAPON
Represents an
ItemStackSnapshot of a weapon. |
public static final EventContextKey<LocatableBlock> BLOCK_EVENT_QUEUE
World
.
For example, a piston will queue retract/extend movements using this
event.
Note: This represents vanilla's block event.public static final EventContextKey<LocatableBlock> BLOCK_EVENT_PROCESS
World
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 after
BLOCK_EVENT_QUEUE
.public static final EventContextKey<BlockSnapshot> BLOCK_HIT
Entity
interacts with a block.public static final EventContextKey<ChangeBlockEvent.Break> BREAK_EVENT
ChangeBlockEvent.Post
to provide
the block event without relying on existing in the Cause
stack.public static final EventContextKey<ChangeBlockEvent.Place> PLACE_EVENT
ChangeBlockEvent.Post
to provide
the block event without relying on existing in the Cause
stack.public static final EventContextKey<ChangeBlockEvent.Modify> MODIFY_EVENT
ChangeBlockEvent.Post
to provide
the block event without relying on existing in the Cause
stack.public static final EventContextKey<ChangeBlockEvent.Decay> DECAY_EVENT
ChangeBlockEvent.Post
to provide
the block event without relying on existing in the Cause
stack.public static final EventContextKey<ChangeBlockEvent.Grow> GROW_EVENT
ChangeBlockEvent.Post
to provide
the block event without relying on existing in the Cause
stack.public static final EventContextKey<BlockSnapshot> GROWTH_ORIGIN
ChangeBlockEvent.Grow
to provide
the origin BlockSnapshot
that is doing the "growing".public static final EventContextKey<User> CREATOR
Entity
.public static final EventContextKey<DamageType> DAMAGE_TYPE
DamageType
to an entity.public static final EventContextKey<DismountType> DISMOUNT_TYPE
public static final EventContextKey<Entity> ENTITY_HIT
Entity
.
Used when an entity, such as a Player, targets an entity via an
interaction.public static final EventContextKey<Player> FAKE_PLAYER
public static final EventContextKey<World> FIRE_SPREAD
public static final EventContextKey<Living> IGNITER
public static final EventContextKey<DamageSource> LAST_DAMAGE_SOURCE
DamageSource
to an Entity
.public static final EventContextKey<World> LEAVES_DECAY
public static final EventContextKey<World> LIQUID_BREAK
public static final EventContextKey<World> LIQUID_FLOW
public static final EventContextKey<World> LIQUID_MIX
public static final EventContextKey<BlockSnapshot> NEIGHBOR_NOTIFY_SOURCE
BlockSnapshot
of a block notification.public static final EventContextKey<User> NOTIFIER
User
that notified a block.public static final EventContextKey<User> OWNER
User
that owns a block.public static final EventContextKey<World> PISTON_EXTEND
BlockTypes.PISTON_HEAD
extends.public static final EventContextKey<World> PISTON_RETRACT
BlockTypes.PISTON_HEAD
retracts.public static final EventContextKey<Player> PLAYER
Player
.public static final EventContextKey<World> PLAYER_BREAK
Player
breaks a block.public static final EventContextKey<World> PLAYER_PLACE
Player
places a block.public static final EventContextKey<GameProfile> PLAYER_SIMULATED
Player
.public static final EventContextKey<PluginContainer> PLUGIN
PluginContainer
.public static final EventContextKey<ProjectileSource> PROJECTILE_SOURCE
ProjectileSource
.public static final EventContextKey<ServiceManager> SERVICE_MANAGER
ServiceManager
.public static final EventContextKey<SpawnType> SPAWN_TYPE
SpawnType
of an entity spawn.public static final EventContextKey<TeleportType> TELEPORT_TYPE
TeleportType
when an entity teleports.@Deprecated public static final EventContextKey<ProjectileSource> THROWER
PROJECTILE_SOURCE
and
will be removed in API 8. See this
issue on SpongeAPI, Use PROJECTILE_SOURCE
instead.public static final EventContextKey<ItemStackSnapshot> USED_ITEM
ItemStackSnapshot
of used item.public static final EventContextKey<HandType> USED_HAND
HandType
.public static final EventContextKey<ItemStackSnapshot> WEAPON
ItemStackSnapshot
of a weapon.