Class Sailing

java.lang.Object
net.storm.sdk.movement.sailing.Sailing

public class Sailing extends Object
Provides utilities for controlling and navigating ships in the Sailing skill.

This class offers methods to control ship movement, direction, speed, and navigation. It supports the Sailing skill mechanics including setting sails, adjusting speed, and steering the ship toward destinations.

Key features include:

  • Direction control: Set and query the ship's heading
  • Navigation: Start and stop auto-navigation
  • Speed control: Adjust ship speed and set/unset sails
  • Ship status: Check if on a boat and get ship information

Example Usage:


 // Check if currently on a boat
 if (Sailing.isOnBoat()) {
     // Get the current ship
     Ship ship = Sailing.getShip();

     // Set sails to start moving
     Sailing.setSails();

     // Set direction toward a target
     WorldPoint destination = new WorldPoint(3000, 3000, 0);
     Sailing.setDirection(destination);

     // Increase speed
     Sailing.increaseSpeed();

     // Enable auto-navigation
     if (!Sailing.isNavigating()) {
         Sailing.navigate();
     }
 }

 // Stop the ship
 Sailing.stopNavigating();
 Sailing.unsetSails();
 
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Decreases the ship's speed using the default interaction method.
    static boolean
    decreaseSpeed(InteractMethod interactMethod)
    Decreases the ship's speed using the specified interaction method.
    Gets the current direction the ship is facing.
    static Ship
    Gets the current ship the player is on.
    static boolean
    Increases the ship's speed using the default interaction method.
    static boolean
    increaseSpeed(InteractMethod interactMethod)
    Increases the ship's speed using the specified interaction method.
    static boolean
    Checks if the ship is currently moving.
    static boolean
    Checks if auto-navigation is currently active.
    static boolean
    Checks if the player is currently on a boat.
    static boolean
    Starts auto-navigation using the default interaction method.
    static boolean
    navigate(InteractMethod interactMethod)
    Starts auto-navigation using the specified interaction method.
    static boolean
    Puts the ship in reverse using the default interaction method.
    static boolean
    reverse(InteractMethod interactMethod)
    Puts the ship in reverse using the specified interaction method.
    static void
    setDirection(net.runelite.api.coords.WorldPoint target)
    Sets the ship's direction toward a target point using the default interaction method.
    static void
    setDirection(InteractMethod interactMethod, net.runelite.api.coords.WorldPoint target)
    Sets the ship's direction toward a target point using the specified interaction method.
    static void
    setDirection(InteractMethod interactMethod, SailingDirection direction)
    Sets the ship's direction using the specified interaction method.
    static void
    Sets the ship's direction using the default interaction method.
    static boolean
    Sets the sails to enable movement using the default interaction method.
    static boolean
    setSails(InteractMethod interactMethod)
    Sets the sails to enable movement using the specified interaction method.
    static boolean
    Stops auto-navigation using the default interaction method.
    static boolean
    Stops auto-navigation using the specified interaction method.
    static boolean
    Unsets the sails to stop movement using the default interaction method.
    static boolean
    unsetSails(InteractMethod interactMethod)
    Unsets the sails to stop movement using the specified interaction method.

    Methods inherited from class java.lang.Object

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

    • Sailing

      public Sailing()
  • Method Details

    • getDirection

      public static SailingDirection getDirection()
      Gets the current direction the ship is facing.
      Returns:
      the current sailing direction
    • isMoving

      public static boolean isMoving()
      Checks if the ship is currently moving.
      Returns:
      true if the ship is in motion, false otherwise
    • isNavigating

      public static boolean isNavigating()
      Checks if auto-navigation is currently active.
      Returns:
      true if navigating automatically, false otherwise
    • setDirection

      public static void setDirection(InteractMethod interactMethod, SailingDirection direction)
      Sets the ship's direction using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      direction - the direction to face
    • setDirection

      public static void setDirection(SailingDirection direction)
      Sets the ship's direction using the default interaction method.
      Parameters:
      direction - the direction to face
    • setDirection

      public static void setDirection(InteractMethod interactMethod, net.runelite.api.coords.WorldPoint target)
      Sets the ship's direction toward a target point using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      target - the target point to face toward
    • setDirection

      public static void setDirection(net.runelite.api.coords.WorldPoint target)
      Sets the ship's direction toward a target point using the default interaction method.
      Parameters:
      target - the target point to face toward
    • stopNavigating

      public static boolean stopNavigating(InteractMethod interactMethod)
      Stops auto-navigation using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      Returns:
      true if navigation was stopped successfully, false otherwise
    • stopNavigating

      public static boolean stopNavigating()
      Stops auto-navigation using the default interaction method.
      Returns:
      true if navigation was stopped successfully, false otherwise
    • setSails

      public static boolean setSails(InteractMethod interactMethod)
      Sets the sails to enable movement using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      Returns:
      true if sails were set successfully, false otherwise
    • setSails

      public static boolean setSails()
      Sets the sails to enable movement using the default interaction method.
      Returns:
      true if sails were set successfully, false otherwise
    • unsetSails

      public static boolean unsetSails(InteractMethod interactMethod)
      Unsets the sails to stop movement using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      Returns:
      true if sails were unset successfully, false otherwise
    • unsetSails

      public static boolean unsetSails()
      Unsets the sails to stop movement using the default interaction method.
      Returns:
      true if sails were unset successfully, false otherwise
    • increaseSpeed

      public static boolean increaseSpeed(InteractMethod interactMethod)
      Increases the ship's speed using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      Returns:
      true if speed was increased successfully, false otherwise
    • increaseSpeed

      public static boolean increaseSpeed()
      Increases the ship's speed using the default interaction method.
      Returns:
      true if speed was increased successfully, false otherwise
    • decreaseSpeed

      public static boolean decreaseSpeed(InteractMethod interactMethod)
      Decreases the ship's speed using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      Returns:
      true if speed was decreased successfully, false otherwise
    • decreaseSpeed

      public static boolean decreaseSpeed()
      Decreases the ship's speed using the default interaction method.
      Returns:
      true if speed was decreased successfully, false otherwise
    • reverse

      public static boolean reverse(InteractMethod interactMethod)
      Puts the ship in reverse using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction
      Returns:
      true if reverse was engaged successfully, false otherwise
    • reverse

      public static boolean reverse()
      Puts the ship in reverse using the default interaction method.
      Returns:
      true if reverse was engaged successfully, false otherwise
    • getShip

      public static Ship getShip()
      Gets the current ship the player is on.
      Returns:
      the current Ship object, or null if not on a ship
    • isOnBoat

      public static boolean isOnBoat()
      Checks if the player is currently on a boat.
      Returns:
      true if on a boat, false otherwise