Class SimpleSafeTTeleporter

    • Method Summary

      All Methods Instance Methods Concrete 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.
      TeleportResult teleport​(org.bukkit.command.CommandSender teleporter, org.bukkit.entity.Player teleportee, MVDestination destination)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleSafeTTeleporter

        public SimpleSafeTTeleporter​(MultiverseCore plugin)
    • Method Detail

      • getSafeLocation

        public org.bukkit.Location getSafeLocation​(org.bukkit.Location l)
        Gets the next safe location around the given location.
        Specified by:
        getSafeLocation in interface SafeTTeleporter
        Parameters:
        l - A Location.
        Returns:
        A safe Location.
      • getSafeLocation

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

        public 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.
        Specified by:
        safelyTeleport in interface SafeTTeleporter
        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

        public 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.
        Specified by:
        safelyTeleport in interface SafeTTeleporter
        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

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

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