Class Teleport
java.lang.Object
net.storm.api.movement.pathfinder.model.Teleport
Represents a teleport method that can instantly transport the player to a destination.
Teleport is a core class in the pathfinding system representing any method of instant transportation. This includes magic spells, jewelry teleports, item teleports, POH teleports, and any other form of instant travel.
Key Properties
- destination - The target location where the teleport lands
- handler - The callable that executes the teleport action
- requirements - Conditions that must be met to use this teleport
- itemRequirements - Items that must be present in inventory/equipment
- priority - Used to order teleports (lower = higher priority)
- weight - Cost factor for pathfinding calculations
Special Teleport Types
- poh - Requires entering a Player-Owned House first
- isHomeTeleport - Home teleport spell (long cooldown, free)
- isMinigameTeleport - Minigame teleport (20-minute cooldown)
- isTimedTeleport - Any teleport with a cooldown timer
Usage Example
Teleport teleport = Teleport.builder()
.destination(new WorldPoint(3212, 3424, 0))
.handler(() -> {
// Execute teleport logic
return true;
})
.itemRequirements(new int[]{ItemID.VARROCK_TELEPORT})
.build();
// Execute the teleport
boolean success = teleport.getHandler().call();
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Teleport
public Teleport()
-
-
Method Details
-
equals
Checks equality based on destination and POH status.Two teleports are considered equal if they have the same destination and the same POH requirement status.
-
isItem
public boolean isItem()Checks if this teleport requires an item in inventory or equipment.- Returns:
- true if itemRequirements is set
-
isObject
public boolean isObject()Checks if this teleport requires interacting with a game object.- Returns:
- true if objectIdRequirements or objectNameRequirements is set
-