Class Teleport

java.lang.Object
net.storm.api.movement.pathfinder.model.Teleport

public class Teleport extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Checks equality based on destination and POH status.
    boolean
    Checks if this teleport requires an item in inventory or equipment.
    boolean
    Checks if this teleport requires interacting with a game object.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Teleport

      public Teleport()
  • Method Details

    • equals

      public boolean equals(Object other)
      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.

      Overrides:
      equals in class Object
      Parameters:
      other - the object to compare
      Returns:
      true if the teleports have the same destination and POH 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