Class Prayers

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

public final class Prayers extends Object
Safe Prayer-tab discovery and exact current prayer toggles through live widgets.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Exact current operation for an inactive prayer.
    static final String
    Exact current operation for an active prayer.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    activate(String prayerName)
    Requests activation of one prayer.
    static boolean
    deactivate(String prayerName)
    Requests deactivation of one prayer.
    find(String prayerName)
    Finds one uniquely visible prayer by display name.
    static boolean
    isActive(String prayerName)
    Returns whether one visible prayer's current exact operation proves it active.
    static boolean
    Returns whether a coherent multi-control prayer panel is currently visible.
    static boolean
    Returns whether the active adapter supports safe prayer toggles.
    static boolean
    Opens the Prayer tab when it is not currently proven visible.
    static boolean
    toggle(String prayerName)
    Requests whichever exact current prayer toggle operation is visible.
    Returns visible current prayer controls from the one confirmed prayer panel.

    Methods inherited from class java.lang.Object

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

    • ACTIVATE_ACTION

      public static final String ACTIVATE_ACTION
      Exact current operation for an inactive prayer.
      See Also:
    • DEACTIVATE_ACTION

      public static final String DEACTIVATE_ACTION
      Exact current operation for an active prayer.
      See Also:
  • Method Details

    • isSupported

      public static boolean isSupported()
      Returns whether the active adapter supports safe prayer toggles. Scripts still need game:interact-widget in their manifest.
    • isOpen

      public static boolean isOpen()
      Returns whether a coherent multi-control prayer panel is currently visible. A lone Quick-prayers Activate widget is not sufficient.
    • open

      public static boolean open()
      Opens the Prayer tab when it is not currently proven visible.
      Returns:
      true when the panel is already open or the tab request was accepted
    • visiblePrayers

      public static List<WidgetSnapshot> visiblePrayers()
      Returns visible current prayer controls from the one confirmed prayer panel.
    • find

      public static Optional<WidgetSnapshot> find(String prayerName)
      Finds one uniquely visible prayer by display name.
    • isActive

      public static boolean isActive(String prayerName)
      Returns whether one visible prayer's current exact operation proves it active.
    • activate

      public static boolean activate(String prayerName)
      Requests activation of one prayer. Returns true without dispatch when the current exact action already proves the prayer active.
    • deactivate

      public static boolean deactivate(String prayerName)
      Requests deactivation of one prayer. Returns true without dispatch when the current exact action already proves the prayer inactive.
    • toggle

      public static boolean toggle(String prayerName)
      Requests whichever exact current prayer toggle operation is visible.