Class EntityTeleportEvent

java.lang.Object
com.welcome234.pluginsystem.events.EntityTeleportEvent

public class EntityTeleportEvent extends Object
Called when an entity teleports
  • Constructor Details

    • EntityTeleportEvent

      public EntityTeleportEvent(int entityID, EntityTeleportEvent.TeleportCause cause, double teleportX, double teleportY, boolean teleportDimension)
  • Method Details

    • getEntity

      public Entity getEntity()
      Gets the entity who has teleported
      Returns:
      Entity instance
    • getTeleportCause

      public EntityTeleportEvent.TeleportCause getTeleportCause()
      Gets the cause of this teleportation
      Returns:
      Teleport cause
    • getTeleportX

      public double getTeleportX()
      Gets the X coordinate the entity has teleported to
      Returns:
      X-coordinate
    • getTeleportY

      public double getTeleportY()
      Gets the Y coordinate the entity has teleported to
      Returns:
      Y-coordinate
    • getTeleportDimension

      public boolean getTeleportDimension()
      Gets the dimension the entity has teleported to
      Returns:
      Dimension (false = Overworld, true = End)
    • isCancelled

      public boolean isCancelled()
      Gets whether this event is cancelled
      Returns:
      Whether cancelled
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets the cancellation status of this event
      Parameters:
      cancelled - Whether cancelled