Package com.valhalla.sdk.api.methods
Class Client
java.lang.Object
com.valhalla.sdk.api.methods.Client
Runtime-session state, adapter capabilities, and loaded-scene helpers.
-
Method Summary
Modifier and TypeMethodDescriptionReturns immutable capability names advertised by the active adapter.static TileReturns the southwest world tile of the loaded scene.static booleanReturns whether the native runtime can accept another action.static booleanReturns whether the native client reports an active game session.static booleanisTileLoaded(Tile tile) Tests whether a world tile belongs to the loaded scene.static voidrequireCapability(String capability) Fails early with a useful message when an OSRS adapter feature is absent.static booleanTests one adapter capability.static booleansupportsAll(String... capabilities) Tests whether every requested runtime capability is active.static booleansupportsAny(String... capabilities) Tests whether at least one requested runtime capability is active.static booleanwaitUntilLoggedIn(long timeoutMillis) Waits for an active game session.
-
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
Returns immutable capability names advertised by the active adapter.- Returns:
- immutable capability names advertised by the active adapter
-
supports
Tests one adapter capability.- Parameters:
capability- capability name, preferably fromCapabilities- Returns:
truewhen the active adapter advertises it
-
supportsAll
Tests whether every requested runtime capability is active.- Parameters:
capabilities- capability names to require- Returns:
truewhen every name is advertised
-
supportsAny
Tests whether at least one requested runtime capability is active.- Parameters:
capabilities- capability names to test- Returns:
truewhen at least one name is advertised
-
requireCapability
Fails early with a useful message when an OSRS adapter feature is absent. Prefer this inonStart; usesupports(String)for optional behavior.- Parameters:
capability- required capability name
-
getSceneBase
Returns the southwest world tile of the loaded scene.- Returns:
- the southwest world tile of the loaded scene
-
isTileLoaded
Tests whether a world tile belongs to the loaded scene.- Parameters:
tile- tile to test- Returns:
truewhen 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:
truewhen login was observed before timeout
-