Class TeleportationManager

java.lang.Object
io.github.thebusybiscuit.slimefun4.api.gps.TeleportationManager

public final class TeleportationManager extends Object
The TeleportationManager handles the process of teleportation for a Player who is using a Teleporter.
Author:
TheBusyBiscuit
See Also:
  • Constructor Details

    • TeleportationManager

      public TeleportationManager()
  • Method Details

    • openTeleporterGUI

      @ParametersAreNonnullByDefault public void openTeleporterGUI(Player p, UUID ownerUUID, Block b)
      Opens the GUI of the teleporter and calculates the network complexity of the Player
      Parameters:
      p - Player to be teleported
      ownerUUID - UUID of the Player who owns the teleporter device
      b - Block from where the Player is being teleported
    • openTeleporterGUI

      @ParametersAreNonnullByDefault public void openTeleporterGUI(Player p, UUID ownerUUID, Block b, int complexity)
    • teleport

      @ParametersAreNonnullByDefault public void teleport(UUID uuid, int complexity, Location source, Location destination, boolean resistance)
    • getTeleportationTime

      public int getTeleportationTime(int complexity, @Nonnull Location source, @Nonnull Location destination)
      This returns the amount of time it will take to teleport from the source Location to the destination Location, given the specified complexity.

      The returned time will be measured in 500ms intervals.

      • A returned time of 100 will mean 50,000ms (50s) of real-life time.
      • A returned time of 10 will mean 5,000ms (5s) of real-life time.
      • A returned time of 2 will mean 1,000ms (1s) of real-life time.
      • and so on...
      Parameters:
      complexity - The complexity of the GPSNetwork
      source - The source Location
      destination - The destination Location
      Returns:
      The amount of time the teleportation will take