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
-
Method Summary
Modifier and TypeMethodDescriptionint
getTeleportationTime
(int complexity, Location source, Location destination) void
openTeleporterGUI
(Player p, UUID ownerUUID, Block b) Opens the GUI of the teleporter and calculates the network complexity of thePlayer
void
openTeleporterGUI
(Player p, UUID ownerUUID, Block b, int complexity) void
-
Constructor Details
-
TeleportationManager
public TeleportationManager()
-
-
Method Details
-
openTeleporterGUI
Opens the GUI of the teleporter and calculates the network complexity of thePlayer
-
openTeleporterGUI
-
teleport
-
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 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
-