Interface IPrayers


public interface IPrayers
Interface for interacting with the Prayer system in the game.

This interface provides methods to manage prayers, including toggling individual prayers, managing quick prayers, checking prayer states, and retrieving information about prayer points. It supports various interaction methods for flexibility in how prayers are activated.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if any prayer is currently active.
    boolean
    canUse(net.runelite.api.Prayer prayer)
    Checks if the player can use the specified prayer based on their prayer level.
    default void
    Disables all currently active prayers using the default interaction method.
    void
    disableAll(InteractMethod interactMethod)
    Disables all currently active prayers using the specified interaction method.
    List<net.runelite.api.Prayer>
    Gets the list of quick prayers that are currently active (enabled via the quick prayer orb).
    net.runelite.api.Prayer
    Gets the best magic offensive prayer available to the player based on their level.
    net.runelite.api.Prayer
    Gets the best melee offensive prayer available to the player based on their level.
    net.runelite.api.Prayer
    Gets the best ranged offensive prayer available to the player based on their level.
    int
    Gets the number of prayer points needed to reach the maximum prayer level.
    int
    Gets the current prayer points of the player.
    List<net.runelite.api.Prayer>
    Gets the list of prayers that are currently selected in the quick prayer configuration.
    boolean
    isEnabled(net.runelite.api.Prayer prayer)
    Checks if the specified prayer is currently enabled/active.
    default boolean
    isQuickPrayerActive(List<net.runelite.api.Prayer> prayers)
    Checks if all the specified prayers are currently active via quick prayers.
    default boolean
    isQuickPrayerActive(net.runelite.api.Prayer prayer)
    Checks if the specified prayer is currently active via quick prayers.
    boolean
    Checks if quick prayers are currently enabled/active.
    boolean
    Checks if the quick prayer configuration interface is currently open.
    default boolean
    isQuickPrayerSelected(List<net.runelite.api.Prayer> prayers)
    Checks if all the specified prayers are selected in the quick prayer configuration.
    default boolean
    isQuickPrayerSelected(net.runelite.api.Prayer prayer)
    Checks if the specified prayer is selected in the quick prayer configuration.
    boolean
    Opens the quick prayer configuration interface.
    default boolean
    setQuickPrayers(List<net.runelite.api.Prayer> prayers)
    Sets the quick prayers to the specified list of prayers and closes the interface.
    boolean
    setQuickPrayers(List<net.runelite.api.Prayer> prayers, boolean closeInterface)
    Sets the quick prayers to the specified list of prayers.
    default void
    toggle(net.runelite.api.Prayer prayer)
    Toggles the specified prayer on or off using the default interaction method.
    void
    toggle(InteractMethod interactMethod, net.runelite.api.Prayer prayer)
    Toggles the specified prayer on or off using the given interaction method.
    default void
    Toggles the quick prayer state using the default interaction method.
    default void
    toggleQuickPrayer(boolean enabled)
    Toggles quick prayers on or off using the default interaction method.
    void
    Toggles the quick prayer state using the specified interaction method.
    void
    toggleQuickPrayer(InteractMethod interactMethod, boolean enabled)
    Toggles quick prayers on or off using the specified interaction method.
  • Method Details

    • getMissingPoints

      int getMissingPoints()
      Gets the number of prayer points needed to reach the maximum prayer level.
      Returns:
      the difference between max prayer points and current prayer points
    • isEnabled

      boolean isEnabled(net.runelite.api.Prayer prayer)
      Checks if the specified prayer is currently enabled/active.
      Parameters:
      prayer - the prayer to check
      Returns:
      true if the prayer is currently active, false otherwise
    • toggle

      void toggle(InteractMethod interactMethod, net.runelite.api.Prayer prayer)
      Toggles the specified prayer on or off using the given interaction method.
      Parameters:
      interactMethod - the method to use for interaction, or null for default
      prayer - the prayer to toggle
    • toggle

      default void toggle(net.runelite.api.Prayer prayer)
      Toggles the specified prayer on or off using the default interaction method.
      Parameters:
      prayer - the prayer to toggle
    • getPoints

      int getPoints()
      Gets the current prayer points of the player.
      Returns:
      the current prayer points
    • toggleQuickPrayer

      void toggleQuickPrayer(InteractMethod interactMethod, boolean enabled)
      Toggles quick prayers on or off using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction, or null for default
      enabled - true to enable quick prayers, false to disable
    • toggleQuickPrayer

      void toggleQuickPrayer(InteractMethod interactMethod)
      Toggles the quick prayer state using the specified interaction method. This will switch the current state (on becomes off, off becomes on).
      Parameters:
      interactMethod - the method to use for interaction, or null for default
    • toggleQuickPrayer

      default void toggleQuickPrayer(boolean enabled)
      Toggles quick prayers on or off using the default interaction method.
      Parameters:
      enabled - true to enable quick prayers, false to disable
    • toggleQuickPrayer

      default void toggleQuickPrayer()
      Toggles the quick prayer state using the default interaction method. This will switch the current state (on becomes off, off becomes on).
    • isQuickPrayerEnabled

      boolean isQuickPrayerEnabled()
      Checks if quick prayers are currently enabled/active.
      Returns:
      true if quick prayers are enabled, false otherwise
    • anyActive

      boolean anyActive()
      Checks if any prayer is currently active.
      Returns:
      true if at least one prayer is active, false otherwise
    • disableAll

      void disableAll(InteractMethod interactMethod)
      Disables all currently active prayers using the specified interaction method.
      Parameters:
      interactMethod - the method to use for interaction, or null for default
    • disableAll

      default void disableAll()
      Disables all currently active prayers using the default interaction method.
    • canUse

      boolean canUse(net.runelite.api.Prayer prayer)
      Checks if the player can use the specified prayer based on their prayer level.
      Parameters:
      prayer - the prayer to check
      Returns:
      true if the player has the required level for the prayer, false otherwise
    • getBestRangeOffensive

      net.runelite.api.Prayer getBestRangeOffensive()
      Gets the best ranged offensive prayer available to the player based on their level.
      Returns:
      the highest level ranged offensive prayer the player can use
    • getBestMageOffensive

      net.runelite.api.Prayer getBestMageOffensive()
      Gets the best magic offensive prayer available to the player based on their level.
      Returns:
      the highest level magic offensive prayer the player can use
    • getBestMeleeOffensive

      net.runelite.api.Prayer getBestMeleeOffensive()
      Gets the best melee offensive prayer available to the player based on their level.
      Returns:
      the highest level melee offensive prayer the player can use
    • isQuickPrayerOpen

      boolean isQuickPrayerOpen()
      Checks if the quick prayer configuration interface is currently open.
      Returns:
      true if the quick prayer interface is open, false otherwise
    • openQuickPrayer

      boolean openQuickPrayer()
      Opens the quick prayer configuration interface.
      Returns:
      true if the interface was successfully opened, false otherwise
    • getSelectedQuickPrayers

      List<net.runelite.api.Prayer> getSelectedQuickPrayers()
      Gets the list of prayers that are currently selected in the quick prayer configuration.
      Returns:
      a list of prayers that are set as quick prayers
    • getActiveQuickPrayers

      List<net.runelite.api.Prayer> getActiveQuickPrayers()
      Gets the list of quick prayers that are currently active (enabled via the quick prayer orb).
      Returns:
      a list of active quick prayers
    • setQuickPrayers

      boolean setQuickPrayers(List<net.runelite.api.Prayer> prayers, boolean closeInterface)
      Sets the quick prayers to the specified list of prayers.
      Parameters:
      prayers - the list of prayers to set as quick prayers
      closeInterface - true to close the interface after setting, false to keep it open
      Returns:
      true if the quick prayers were successfully set, false otherwise
    • setQuickPrayers

      default boolean setQuickPrayers(List<net.runelite.api.Prayer> prayers)
      Sets the quick prayers to the specified list of prayers and closes the interface.
      Parameters:
      prayers - the list of prayers to set as quick prayers
      Returns:
      true if the quick prayers were successfully set, false otherwise
    • isQuickPrayerSelected

      default boolean isQuickPrayerSelected(net.runelite.api.Prayer prayer)
      Checks if the specified prayer is selected in the quick prayer configuration.
      Parameters:
      prayer - the prayer to check
      Returns:
      true if the prayer is selected as a quick prayer, false otherwise
    • isQuickPrayerSelected

      default boolean isQuickPrayerSelected(List<net.runelite.api.Prayer> prayers)
      Checks if all the specified prayers are selected in the quick prayer configuration.
      Parameters:
      prayers - the list of prayers to check
      Returns:
      true if all prayers are selected as quick prayers, false otherwise
    • isQuickPrayerActive

      default boolean isQuickPrayerActive(net.runelite.api.Prayer prayer)
      Checks if the specified prayer is currently active via quick prayers.
      Parameters:
      prayer - the prayer to check
      Returns:
      true if the prayer is currently active via quick prayers, false otherwise
    • isQuickPrayerActive

      default boolean isQuickPrayerActive(List<net.runelite.api.Prayer> prayers)
      Checks if all the specified prayers are currently active via quick prayers.
      Parameters:
      prayers - the list of prayers to check
      Returns:
      true if all prayers are active via quick prayers, false otherwise