Class TeleportationManager
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.gps.TeleportationManager
The
TeleportationManager
handles the process of teleportation for a Player
who is using a Teleporter
.- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getTeleportationTime
(int complexity, org.bukkit.Location source, org.bukkit.Location destination) This returns the amount of time it will take to teleport from the sourceLocation
to the destinationLocation
, given the specified complexity.void
openTeleporterGUI
(org.bukkit.entity.Player p, UUID ownerUUID, org.bukkit.block.Block b) Opens the GUI of the teleporter and calculates the network complexity of thePlayer
void
openTeleporterGUI
(org.bukkit.entity.Player p, UUID ownerUUID, org.bukkit.block.Block b, int complexity) void
teleport
(UUID uuid, int complexity, org.bukkit.Location source, org.bukkit.Location destination, boolean resistance)
-
Constructor Details
-
TeleportationManager
public TeleportationManager()
-
-
Method Details
-
openTeleporterGUI
@ParametersAreNonnullByDefault public void openTeleporterGUI(org.bukkit.entity.Player p, UUID ownerUUID, org.bukkit.block.Block b) Opens the GUI of the teleporter and calculates the network complexity of thePlayer
- Parameters:
p
-Player
to be teleportedownerUUID
-UUID
of thePlayer
who owns the teleporter deviceb
-Block
from where thePlayer
is being teleported
-
openTeleporterGUI
@ParametersAreNonnullByDefault public void openTeleporterGUI(org.bukkit.entity.Player p, UUID ownerUUID, org.bukkit.block.Block b, int complexity) -
teleport
@ParametersAreNonnullByDefault public void teleport(UUID uuid, int complexity, org.bukkit.Location source, org.bukkit.Location destination, boolean resistance) -
getTeleportationTime
public int getTeleportationTime(int complexity, @Nonnull org.bukkit.Location source, @Nonnull org.bukkit.Location destination) This returns the amount of time it will take to teleport from the sourceLocation
to the destinationLocation
, 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 theGPSNetwork
source
- The sourceLocation
destination
- The destinationLocation
- Returns:
- The amount of time the teleportation will take
-