Interface SafeTTeleporter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.bukkit.Location findPortalBlockNextTo​(org.bukkit.Location l)
      Finds a portal-block next to the specified Location.
      org.bukkit.Location getSafeLocation​(org.bukkit.entity.Entity e, MVDestination d)
      Returns a safe location for the entity to spawn at.
      org.bukkit.Location getSafeLocation​(org.bukkit.Location l)
      Gets the next safe location around the given location.
      org.bukkit.Location getSafeLocation​(org.bukkit.Location l, int tolerance, int radius)
      Gets the next safe location around the given location.
      TeleportResult safelyTeleport​(org.bukkit.command.CommandSender teleporter, org.bukkit.entity.Entity teleportee, MVDestination d)
      Safely teleport the entity to the MVDestination.
      TeleportResult safelyTeleport​(org.bukkit.command.CommandSender teleporter, org.bukkit.entity.Entity teleportee, org.bukkit.Location location, boolean safely)
      Safely teleport the entity to the Location.
    • Method Detail

      • getSafeLocation

        org.bukkit.Location getSafeLocation​(org.bukkit.Location l)
        Gets the next safe location around the given location.
        Parameters:
        l - A Location.
        Returns:
        A safe Location.
      • getSafeLocation

        org.bukkit.Location getSafeLocation​(org.bukkit.Location l,
                                            int tolerance,
                                            int radius)
        Gets the next safe location around the given location.
        Parameters:
        l - A Location.
        tolerance - The tolerance.
        radius - The radius.
        Returns:
        A safe Location.
      • safelyTeleport

        TeleportResult safelyTeleport​(org.bukkit.command.CommandSender teleporter,
                                      org.bukkit.entity.Entity teleportee,
                                      MVDestination d)
        Safely teleport the entity to the MVDestination. This will perform checks to see if the place is safe, and if it's not, will adjust the final destination accordingly.
        Parameters:
        teleporter - Person who performed the teleport command.
        teleportee - Entity to teleport
        d - Destination to teleport them to
        Returns:
        true for success, false for failure
      • safelyTeleport

        TeleportResult safelyTeleport​(org.bukkit.command.CommandSender teleporter,
                                      org.bukkit.entity.Entity teleportee,
                                      org.bukkit.Location location,
                                      boolean safely)
        Safely teleport the entity to the Location. This may perform checks to see if the place is safe, and if it's not, will adjust the final destination accordingly.
        Parameters:
        teleporter - Person who issued the teleport command.
        teleportee - Entity to teleport.
        location - Location to teleport them to.
        safely - Should the destination be checked for safety before teleport?
        Returns:
        true for success, false for failure.
      • getSafeLocation

        org.bukkit.Location getSafeLocation​(org.bukkit.entity.Entity e,
                                            MVDestination d)
        Returns a safe location for the entity to spawn at.
        Parameters:
        e - The entity to spawn
        d - The MVDestination to take the entity to.
        Returns:
        A new location to spawn the entity at.
      • findPortalBlockNextTo

        org.bukkit.Location findPortalBlockNextTo​(org.bukkit.Location l)
        Finds a portal-block next to the specified Location.
        Parameters:
        l - The Location
        Returns:
        The next portal-block's Location.