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 TypeMethodDescriptionintgetTeleportationTime(int complexity, org.bukkit.Location source, org.bukkit.Location destination) This returns the amount of time it will take to teleport from the sourceLocationto the destinationLocation, given the specified complexity.voidopenTeleporterGUI(org.bukkit.entity.Player p, UUID ownerUUID, org.bukkit.block.Block b) Opens the GUI of the teleporter and calculates the network complexity of thePlayervoidopenTeleporterGUI(org.bukkit.entity.Player p, UUID ownerUUID, org.bukkit.block.Block b, int complexity) voidteleport(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-Playerto be teleportedownerUUID-UUIDof thePlayerwho owns the teleporter deviceb-Blockfrom where thePlayeris 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 sourceLocationto 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 theGPSNetworksource- The sourceLocationdestination- The destinationLocation- Returns:
- The amount of time the teleportation will take
-