Class ServerEntityLevelChangeEvents
- API Note:
- For a
ServerPlayer, please useAFTER_PLAYER_CHANGE_LEVEL.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Event<ServerEntityLevelChangeEvents.AfterEntityChange> An event which is called after an entity has been moved to a different level.static final Event<ServerEntityLevelChangeEvents.AfterPlayerChange> An event which is called after a player has been moved to a different level. -
Method Summary
-
Field Details
-
AFTER_ENTITY_CHANGE_LEVEL
public static final Event<ServerEntityLevelChangeEvents.AfterEntityChange> AFTER_ENTITY_CHANGE_LEVELAn event which is called after an entity has been moved to a different level.All entities are copied to the destination and the old entity removed. This event does not apply to the
ServerPlayersince players are physically moved to the new level instead of being copied over.A mod may use this event for reference cleanup if it is tracking an entity's current level.
- See Also:
-
AFTER_PLAYER_CHANGE_LEVEL
public static final Event<ServerEntityLevelChangeEvents.AfterPlayerChange> AFTER_PLAYER_CHANGE_LEVELAn event which is called after a player has been moved to a different level.This is similar to
AFTER_ENTITY_CHANGE_LEVELbut is only called for players. This is because the player is usually physically moved to the new level instead of being recreated at the destination.However, there is one exception to this. When the player respawns in a different level, the player is recreated at the destination. When that happens, this event passes in the new
ServerPlayer. If you need the oldServerPlayer, seeServerPlayerEvents.AFTER_RESPAWN- See Also:
-