Class Client

java.lang.Object
com.valhalla.sdk.api.methods.Client

public final class Client extends Object
Runtime-session state, adapter capabilities, and loaded-scene helpers.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<String>
    Returns immutable capability names advertised by the active adapter.
    static Tile
    Returns the southwest world tile of the loaded scene.
    static boolean
    Returns whether the native runtime can accept another action.
    static boolean
    Returns whether the native client reports an active game session.
    static boolean
    Tests whether a world tile belongs to the loaded scene.
    static void
    Fails early with a useful message when an OSRS adapter feature is absent.
    static boolean
    supports(String capability)
    Tests one adapter capability.
    static boolean
    supportsAll(String... capabilities)
    Tests whether every requested runtime capability is active.
    static boolean
    supportsAny(String... capabilities)
    Tests whether at least one requested runtime capability is active.
    static boolean
    waitUntilLoggedIn(long timeoutMillis)
    Waits for an active game session.

    Methods inherited from class java.lang.Object

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

    • isLoggedIn

      public static boolean isLoggedIn()
      Returns whether the native client reports an active game session.
      Returns:
      whether the native client reports an active game session
    • isActionReady

      public static boolean isActionReady()
      Returns whether the native runtime can accept another action.
      Returns:
      whether the native runtime can accept another action
    • getCapabilities

      public static Set<String> getCapabilities()
      Returns immutable capability names advertised by the active adapter.
      Returns:
      immutable capability names advertised by the active adapter
    • supports

      public static boolean supports(String capability)
      Tests one adapter capability.
      Parameters:
      capability - capability name, preferably from Capabilities
      Returns:
      true when the active adapter advertises it
    • supportsAll

      public static boolean supportsAll(String... capabilities)
      Tests whether every requested runtime capability is active.
      Parameters:
      capabilities - capability names to require
      Returns:
      true when every name is advertised
    • supportsAny

      public static boolean supportsAny(String... capabilities)
      Tests whether at least one requested runtime capability is active.
      Parameters:
      capabilities - capability names to test
      Returns:
      true when at least one name is advertised
    • requireCapability

      public static void requireCapability(String capability)
      Fails early with a useful message when an OSRS adapter feature is absent. Prefer this in onStart; use supports(String) for optional behavior.
      Parameters:
      capability - required capability name
    • getSceneBase

      public static Tile getSceneBase()
      Returns the southwest world tile of the loaded scene.
      Returns:
      the southwest world tile of the loaded scene
    • isTileLoaded

      public static boolean isTileLoaded(Tile tile)
      Tests whether a world tile belongs to the loaded scene.
      Parameters:
      tile - tile to test
      Returns:
      true when native scene state covers the tile
    • waitUntilLoggedIn

      public static boolean waitUntilLoggedIn(long timeoutMillis)
      Waits for an active game session.
      Parameters:
      timeoutMillis - non-negative timeout in milliseconds
      Returns:
      true when login was observed before timeout