Interface ChangeEntityWorldEvent

All Superinterfaces:
Event
All Known Subinterfaces:
ChangeEntityWorldEvent.Post, ChangeEntityWorldEvent.Pre, ChangeEntityWorldEvent.Reposition, RespawnPlayerEvent, RespawnPlayerEvent.Post, RespawnPlayerEvent.Recreate, RespawnPlayerEvent.SelectWorld

public interface ChangeEntityWorldEvent extends Event
Called when an Entity is changing worlds.
  • Method Details

    • entity

      Entity entity()
      Gets the Entity.
      Returns:
      The entity
    • originalWorld

      ServerWorld originalWorld()
      Gets the world the Entity is coming from.

      One thing to keep in mind is that an implementation may choose to unload worlds, for any reason. Our API guarantees that the destination world will be loaded but we give no guarantee that the origin world is. With that in mind, we highly recommend you check World.isLoaded() before interacting with this world in any manner.

      Returns:
      The world
    • originalDestinationWorld

      ServerWorld originalDestinationWorld()
      Gets the world the Entity originally was going to.
      Returns:
      The world
    • destinationWorld

      ServerWorld destinationWorld()
      Gets the world the Entity will be going to.
      Returns:
      The world