Class EntityTeleportHinderedEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.purpurmc.purpur.event.entity.EntityTeleportHinderedEvent

@NullMarked public class EntityTeleportHinderedEvent extends EntityEvent
Fired when an entity is hindered from teleporting.
  • Constructor Details

  • Method Details

    • getReason

      Returns:
      why the teleport was hindered.
    • getTeleportCause

      public @Nullable PlayerTeleportEvent.TeleportCause getTeleportCause()
      Returns:
      why the teleport occurred if cause was given, otherwise null.
    • shouldRetry

      public boolean shouldRetry()
      Whether the teleport should be retried.

      Note that this can put the server in a never-ending loop of trying to teleport someone resulting in a stack overflow. Do not retry more than necessary.

      Returns:
      whether the teleport should be retried.
    • setShouldRetry

      public void setShouldRetry(boolean retry)
      Sets whether the teleport should be retried.

      Note that this can put the server in a never-ending loop of trying to teleport someone resulting in a stack overflow. Do not retry more than necessary.

      Parameters:
      retry - whether the teleport should be retried.
    • callEvent

      public boolean callEvent()
      Calls the event and tests if should retry.
      Overrides:
      callEvent in class Event
      Returns:
      whether the teleport should be retried.
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()