Interface TeleportationManager

  • All Known Implementing Classes:
    SimpleTeleportationManager

    public interface TeleportationManager
    Manager responsible for teleportation related actions
    • Method Summary

      Modifier and Type Method Description
      CompletableFuture<Boolean> allowedTeleport​(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Location location)
      Check whether or not the player is allowed to teleport to the specified location
      CompletableFuture<Boolean> canTeleport​(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Location location)
      Check whether or not the player can safely teleport to the specified location
      @Nullable org.bukkit.Location endDestination​(@NotNull org.bukkit.entity.Entity entity)
      Handle end portal teleportation
      @NotNull CompletableFuture<org.bukkit.Location> findSafe​(@NotNull org.bukkit.Location location)
      Find a safe teleportation location near the specified location
      @Nullable org.bukkit.Location netherDestination​(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Location location)
      Handle nether portal teleportation
      void teleportPlayer​(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Location location)
      Teleport the player to a given location
    • Method Detail

      • allowedTeleport

        CompletableFuture<Boolean> allowedTeleport​(@NotNull
                                                   @NotNull org.bukkit.entity.Player player,
                                                   @NotNull
                                                   @NotNull org.bukkit.Location location)
        Check whether or not the player is allowed to teleport to the specified location
        Parameters:
        player - Player that is about to teleport
        location - Location the player is teleporting to
        Returns:
        True if the player is allowed to teleport to the location
      • canTeleport

        CompletableFuture<Boolean> canTeleport​(@NotNull
                                               @NotNull org.bukkit.entity.Player player,
                                               @NotNull
                                               @NotNull org.bukkit.Location location)
        Check whether or not the player can safely teleport to the specified location
        Parameters:
        player - Player that is about to teleport
        location - Location the player is teleporting to
        Returns:
        True if the player is able to teleport to the location
      • findSafe

        @NotNull
        @NotNull CompletableFuture<org.bukkit.Location> findSafe​(@NotNull
                                                                 @NotNull org.bukkit.Location location)
        Find a safe teleportation location near the specified location
        Parameters:
        location - Search origin
        Returns:
        Safe location
      • teleportPlayer

        void teleportPlayer​(@NotNull
                            @NotNull org.bukkit.entity.Player player,
                            @NotNull
                            @NotNull org.bukkit.Location location)
        Teleport the player to a given location
        Parameters:
        player - Player to teleport
        location - Location to teleport the player to
      • netherDestination

        @Nullable
        @Nullable org.bukkit.Location netherDestination​(@NotNull
                                                        @NotNull org.bukkit.entity.Entity entity,
                                                        @NotNull
                                                        @NotNull org.bukkit.Location location)
        Handle nether portal teleportation
        Parameters:
        entity - Entity to teleport
        location - Portal location
      • endDestination

        @Nullable
        @Nullable org.bukkit.Location endDestination​(@NotNull
                                                     @NotNull org.bukkit.entity.Entity entity)
        Handle end portal teleportation
        Parameters:
        entity - Entity to teleport