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 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
    • getVarp

      public static OptionalInt getVarp(int varpId)
      Reads one revision-validated client varp.
      Parameters:
      varpId - non-negative client varp identifier
      Returns:
      the current value, or empty when the adapter cannot provide it
    • 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