Package net.storm.api.widgets
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 TypeMethodDescriptionbooleanChecks if any prayer is currently active.booleancanUse(net.runelite.api.Prayer prayer) Checks if the player can use the specified prayer based on their prayer level.default voidDisables all currently active prayers using the default interaction method.voiddisableAll(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.PrayerGets the best magic offensive prayer available to the player based on their level.net.runelite.api.PrayerGets the best melee offensive prayer available to the player based on their level.net.runelite.api.PrayerGets the best ranged offensive prayer available to the player based on their level.intGets the number of prayer points needed to reach the maximum prayer level.intGets 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.booleanisEnabled(net.runelite.api.Prayer prayer) Checks if the specified prayer is currently enabled/active.default booleanisQuickPrayerActive(List<net.runelite.api.Prayer> prayers) Checks if all the specified prayers are currently active via quick prayers.default booleanisQuickPrayerActive(net.runelite.api.Prayer prayer) Checks if the specified prayer is currently active via quick prayers.booleanChecks if quick prayers are currently enabled/active.booleanChecks if the quick prayer configuration interface is currently open.default booleanisQuickPrayerSelected(List<net.runelite.api.Prayer> prayers) Checks if all the specified prayers are selected in the quick prayer configuration.default booleanisQuickPrayerSelected(net.runelite.api.Prayer prayer) Checks if the specified prayer is selected in the quick prayer configuration.booleanOpens the quick prayer configuration interface.default booleansetQuickPrayers(List<net.runelite.api.Prayer> prayers) Sets the quick prayers to the specified list of prayers and closes the interface.booleansetQuickPrayers(List<net.runelite.api.Prayer> prayers, boolean closeInterface) Sets the quick prayers to the specified list of prayers.default voidtoggle(net.runelite.api.Prayer prayer) Toggles the specified prayer on or off using the default interaction method.voidtoggle(InteractMethod interactMethod, net.runelite.api.Prayer prayer) Toggles the specified prayer on or off using the given interaction method.default voidToggles the quick prayer state using the default interaction method.default voidtoggleQuickPrayer(boolean enabled) Toggles quick prayers on or off using the default interaction method.voidtoggleQuickPrayer(InteractMethod interactMethod) Toggles the quick prayer state using the specified interaction method.voidtoggleQuickPrayer(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:
trueif the prayer is currently active,falseotherwise
-
toggle
Toggles the specified prayer on or off using the given interaction method.- Parameters:
interactMethod- the method to use for interaction, ornullfor defaultprayer- 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
Toggles quick prayers on or off using the specified interaction method.- Parameters:
interactMethod- the method to use for interaction, ornullfor defaultenabled-trueto enable quick prayers,falseto disable
-
toggleQuickPrayer
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, ornullfor default
-
toggleQuickPrayer
default void toggleQuickPrayer(boolean enabled) Toggles quick prayers on or off using the default interaction method.- Parameters:
enabled-trueto enable quick prayers,falseto 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:
trueif quick prayers are enabled,falseotherwise
-
anyActive
boolean anyActive()Checks if any prayer is currently active.- Returns:
trueif at least one prayer is active,falseotherwise
-
disableAll
Disables all currently active prayers using the specified interaction method.- Parameters:
interactMethod- the method to use for interaction, ornullfor 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:
trueif the player has the required level for the prayer,falseotherwise
-
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:
trueif the quick prayer interface is open,falseotherwise
-
openQuickPrayer
boolean openQuickPrayer()Opens the quick prayer configuration interface.- Returns:
trueif the interface was successfully opened,falseotherwise
-
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
Sets the quick prayers to the specified list of prayers.- Parameters:
prayers- the list of prayers to set as quick prayerscloseInterface-trueto close the interface after setting,falseto keep it open- Returns:
trueif the quick prayers were successfully set,falseotherwise
-
setQuickPrayers
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:
trueif the quick prayers were successfully set,falseotherwise
-
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:
trueif the prayer is selected as a quick prayer,falseotherwise
-
isQuickPrayerSelected
Checks if all the specified prayers are selected in the quick prayer configuration.- Parameters:
prayers- the list of prayers to check- Returns:
trueif all prayers are selected as quick prayers,falseotherwise
-
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:
trueif the prayer is currently active via quick prayers,falseotherwise
-
isQuickPrayerActive
Checks if all the specified prayers are currently active via quick prayers.- Parameters:
prayers- the list of prayers to check- Returns:
trueif all prayers are active via quick prayers,falseotherwise
-