Interface ISailing


public interface ISailing
Interface for controlling sailing mechanics in the game.

ISailing provides methods for navigating ships across water, controlling speed and direction, and managing sail states. This interface is part of the sailing skill content and allows automation of ship movement.

Key Features

  • Direction control - Set heading using compass directions or target points
  • Speed control - Increase/decrease speed, set sails, or reverse
  • Navigation - Automated navigation to waypoints
  • State queries - Check if moving, navigating, or on a boat

Usage Example


 ISailing sailing = Static.getSailing();

 // Check if on a boat
 if (sailing.isOnBoat()) {
     // Set direction to sail north
     sailing.setDirection(SailingDirection.NORTH);

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

     // Or navigate to a specific point
     sailing.setDirection(new WorldPoint(2000, 2000, 0));
 }
 
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Decreases the ship's speed using the default interaction method.
    boolean
    decreaseSpeed(InteractMethod interactMethod)
    Decreases the ship's speed.
    Gets the current heading direction of the ship.
    Gets the current ship instance being controlled.
    default boolean
    Increases the ship's speed using the default interaction method.
    boolean
    increaseSpeed(InteractMethod interactMethod)
    Increases the ship's speed (if possible).
    boolean
    Checks if the ship is currently in motion.
    boolean
    Checks if the ship is currently in automated navigation mode.
    boolean
    Checks if the player is currently on a boat.
    default boolean
    Starts automated navigation using the default interaction method.
    boolean
    navigate(InteractMethod interactMethod)
    Starts automated navigation to the current waypoint.
    default boolean
    Reverses the ship using the default interaction method.
    boolean
    reverse(InteractMethod interactMethod)
    Reverses the ship's direction of travel.
    default void
    setDirection(net.runelite.api.coords.WorldPoint target)
    Sets the ship's heading to point toward a target world point using the default interaction method.
    void
    setDirection(InteractMethod interactMethod, net.runelite.api.coords.WorldPoint target)
    Sets the ship's heading to point toward a target world point.
    void
    setDirection(InteractMethod interactMethod, SailingDirection direction)
    Sets the ship's heading direction using the specified interaction method.
    default void
    Sets the ship's heading direction using the default interaction method.
    default boolean
    Sets the sails using the default interaction method.
    boolean
    setSails(InteractMethod interactMethod)
    Sets the sails to begin moving the ship.
    default boolean
    Stops automated navigation using the default interaction method.
    boolean
    Stops automated navigation.
    default boolean
    Unsets the sails using the default interaction method.
    boolean
    unsetSails(InteractMethod interactMethod)
    Unsets (furls) the sails to stop the ship.
  • Method Details

    • getDirection

      SailingDirection getDirection()
      Gets the current heading direction of the ship.
      Returns:
      the current SailingDirection the ship is facing
    • isMoving

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

      boolean isNavigating()
      Checks if the ship is currently in automated navigation mode.
      Returns:
      true if auto-navigation is active
    • setDirection

      void setDirection(InteractMethod interactMethod, SailingDirection direction)
      Sets the ship's heading direction using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      direction - the target sailing direction
    • setDirection

      default void setDirection(SailingDirection direction)
      Sets the ship's heading direction using the default interaction method.
      Parameters:
      direction - the target sailing direction
    • setDirection

      void setDirection(InteractMethod interactMethod, net.runelite.api.coords.WorldPoint target)
      Sets the ship's heading to point toward a target world point.
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      target - the target world point to sail toward
    • setDirection

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

      boolean stopNavigating(InteractMethod interactMethod)
      Stops automated navigation.
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      Returns:
      true if navigation was successfully stopped
    • stopNavigating

      default boolean stopNavigating()
      Stops automated navigation using the default interaction method.
      Returns:
      true if navigation was successfully stopped
    • setSails

      boolean setSails(InteractMethod interactMethod)
      Sets the sails to begin moving the ship.
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      Returns:
      true if sails were successfully set
    • setSails

      default boolean setSails()
      Sets the sails using the default interaction method.
      Returns:
      true if sails were successfully set
    • unsetSails

      boolean unsetSails(InteractMethod interactMethod)
      Unsets (furls) the sails to stop the ship.
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      Returns:
      true if sails were successfully unset
    • unsetSails

      default boolean unsetSails()
      Unsets the sails using the default interaction method.
      Returns:
      true if sails were successfully unset
    • increaseSpeed

      boolean increaseSpeed(InteractMethod interactMethod)
      Increases the ship's speed (if possible).
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      Returns:
      true if speed was successfully increased
    • increaseSpeed

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

      boolean decreaseSpeed(InteractMethod interactMethod)
      Decreases the ship's speed.
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      Returns:
      true if speed was successfully decreased
    • decreaseSpeed

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

      boolean reverse(InteractMethod interactMethod)
      Reverses the ship's direction of travel.
      Parameters:
      interactMethod - the method to use for interaction (null for default)
      Returns:
      true if reverse was successfully activated
    • reverse

      default boolean reverse()
      Reverses the ship using the default interaction method.
      Returns:
      true if reverse was successfully activated
    • getShip

      Ship getShip()
      Gets the current ship instance being controlled.
      Returns:
      the current Ship, or null if not on a ship
    • isOnBoat

      boolean isOnBoat()
      Checks if the player is currently on a boat.
      Returns:
      true if the player is on a boat