PrayerAPI
PrayerAPI provides methods to interact with and manage prayers in the game.
EnumRLPlugins API
public enum PrayerAPIIt allows checking prayer levels, toggling prayers, managing quick prayers, and retrieving the highest available prayers based on the player's level.
Values
THICK_SKIN- Thick Skin (Level 1, Defence).
BURST_OF_STRENGTH- Burst of Strength (Level 4, Strength).
CLARITY_OF_THOUGHT- Clarity of Thought (Level 7, Attack).
SHARP_EYE- Sharp Eye (Level 8, Ranging).
MYSTIC_WILL- Mystic Will (Level 9, Magic).
ROCK_SKIN- Rock Skin (Level 10, Defence).
SUPERHUMAN_STRENGTH- Superhuman Strength (Level 13, Strength).
IMPROVED_REFLEXES- Improved Reflexes (Level 16, Attack).
RAPID_RESTORE- Rapid Restore (Level 19, Stats).
RAPID_HEAL- Rapid Heal (Level 22, Hitpoints).
PROTECT_ITEM- Protect Item (Level 25).
HAWK_EYE- Hawk Eye (Level 26, Ranging).
MYSTIC_LORE- Mystic Lore (Level 27, Magic).
STEEL_SKIN- Steel Skin (Level 28, Defence).
ULTIMATE_STRENGTH- Ultimate Strength (Level 31, Strength).
INCREDIBLE_REFLEXES- Incredible Reflexes (Level 34, Attack).
PROTECT_FROM_MAGIC- Protect from Magic (Level 37).
PROTECT_FROM_MISSILES- Protect from Missiles (Level 40).
PROTECT_FROM_MELEE- Protect from Melee (Level 43).
EAGLE_EYE- Eagle Eye (Level 44, Ranging).
MYSTIC_MIGHT- Mystic Might (Level 45, Magic).
RETRIBUTION- Retribution (Level 46).
REDEMPTION- Redemption (Level 49).
SMITE- Smite (Level 52).
PRESERVE- Preserve (Level 55).
CHIVALRY- Chivalry (Level 60, Defence/Strength/Attack).
PIETY- Piety (Level 70, Defence/Strength/Attack).
RIGOUR- Rigour (Level 74, Ranging/Damage/Defence).
AUGURY- Augury (Level 77, Magic/Magic Def./Defence).
DEADEYEMYSTIC_VIGOURZEAL
Members
Methods
- booleananyActive()
Checks if the player has any active prayers.
- voidcancelQuickPrayerFlick()
Cancels a queued quick-prayer reactivation without toggling the current prayers.
- voiddisableAll()
Disables all active prayers for the given client.
- voidflick(Collection<PrayerAPI>)
Flicks the given prayers.
- voidflick(PrayerAPI...)
Flicks the given prayers.
- voidflickQuickPrayer()
Flick quick prayers (turns on if off, then off -> on).
- voidflickQuickPrayerDelayed()
Tick-owned quick-prayer flick with 35-79ms deferred reactivation.
- PrayerAPIgetActiveOverhead()
The overhead prayer that is on.
- List<PrayerAPI>getActivePrayers()
Returns all currently active prayers.
- doublegetDrainRate()
How fast the prayer uses prayer points.
- intgetInterfaceId()
The id of the prayer's button.
- intgetLevel()
The Prayer level you need for it.
- PrayerAPIgetMagicPrayer()
Returns the highest available magic prayer for the given client.
- PrayerAPIgetMeleeAttackPrayer()
Returns the highest available melee attack prayer for the given client.
- PrayerAPIgetMeleeDefensePrayer()
Returns the highest available melee defense prayer for the given client.
- PrayerAPIgetMeleePrayer()
Returns the highest available melee prayer for the given client (chivalry or piety).
- PrayerAPIgetMeleeStrengthPrayer()
Returns the highest available melee strength prayer for the given client.
- List<PrayerAPI>getOffensivePrayers()
Selects the configured available offense for the current weapon family.
- List<PrayerAPI>getOffensivePrayers(CombatAttackStyle)
Selects the shared configured offense for an explicit combat family.
- intgetQuickPrayerIndex()
The prayer's place in the quick-prayer list.
- PrayerAPIgetRangedPrayer()
Returns the highest available ranged prayer for the given client.
- intgetVarbit()
The varbit that says whether the prayer is on.
- booleanhasLevelFor()
Check if the player has the level for this prayer.
- booleanisActive()
Checks if the prayer is active for the given client.
- booleanisAvailable()
Whether this prayer is unlocked, unreplaced and within the player's prayer level.
- booleanisQuickPrayer()
Check if this prayer is set as a quick prayer.
- booleanisQuickPrayerEnabled()
Check if the quick prayers are enabled currently.
- booleanisQuickPrayerFlickSuppressed()
Whether the client holds quick-prayer flicks back right now.
- booleanmanage(PrayerAPI$Mode, Collection<PrayerAPI>)
Applies one tick of the native prayer policy.
- voidsetQuickPrayer(PrayerAPI...)
Set the quick prayers.
- voidsetQuickPrayerFlickSuppressed(boolean)
Allows an encounter handler to suspend the generic quick-prayer flicker.
- voidstopManaging()
Stops pending flicks and disables managed prayers according to the shared manual-prayer preference.
- voidstopManagingAfterInputCancellation()
Finish owned prayer cleanup after the caller cancelled its mouse session's queued input.
- voidstopQuickPrayerFlick()
Cancels the delayed phase and turns quick prayers off without toggling an already queued off back on.
- voidswitchOffensivePrayers()
Switch weapon offense while retaining active protection and utility prayers.
- voidtoggle()
Toggles the prayer for the given client, only if the player meets the level requirements.
- voidtoggle(PrayerAPI)
Turns these prayers on.
- voidtoggle(PrayerAPI...)
Turns these prayers on.
- voidtoggleQuickPrayer()
Toggle quick prayer activation.
- voidturnOff()
Turns off the prayer for the given client if it's currently active.
- voidturnOffQuickPrayers()
Turn off quick prayers.
- voidturnOn()
Turns on the prayer for the given client if it's not already active.
- voidturnOnQuickPrayers()
Turn quick prayer on.
anyActive()static
public static boolean anyActive()Checks if the player has any active prayers.
Returns
True if any prayer is active.
cancelQuickPrayerFlick()static
public static void cancelQuickPrayerFlick()Cancels a queued quick-prayer reactivation without toggling the current prayers.
disableAll()static
public static void disableAll()Disables all active prayers for the given client.
flick(Collection<PrayerAPI>)static
public static void flick(Collection<PrayerAPI> prayers)Flicks the given prayers.
Parameters
prayers- The prayers to flick.
flick(PrayerAPI...)static
public static void flick(PrayerAPI... prayers)Flicks the given prayers.
Parameters
prayers- The prayers to flick.
flickQuickPrayer()static
public static void flickQuickPrayer()Flick quick prayers (turns on if off, then off -> on).
flickQuickPrayerDelayed()static
public static void flickQuickPrayerDelayed()Tick-owned quick-prayer flick with 35-79ms deferred reactivation.
getActiveOverhead()static
public static PrayerAPI getActiveOverhead()The overhead prayer that is on.
Returns
The current active overhead prayer.
getActivePrayers()static
public static List<PrayerAPI> getActivePrayers()Returns all currently active prayers.
Returns
Active prayers.
getDrainRate()
public double getDrainRate()How fast the prayer uses prayer points.
getInterfaceId()
public int getInterfaceId()The id of the prayer's button.
getLevel()
public int getLevel()The Prayer level you need for it.
getMagicPrayer()static
public static PrayerAPI getMagicPrayer()Returns the highest available magic prayer for the given client.
Returns
The highest available magic prayer, or null if none is available.
getMeleeAttackPrayer()static
public static PrayerAPI getMeleeAttackPrayer()Returns the highest available melee attack prayer for the given client.
Returns
The highest available melee attack prayer, or null if none is available.
getMeleeDefensePrayer()static
public static PrayerAPI getMeleeDefensePrayer()Returns the highest available melee defense prayer for the given client.
Returns
The highest available melee attack prayer, or null if none is available.
getMeleePrayer()static
public static PrayerAPI getMeleePrayer()Returns the highest available melee prayer for the given client (chivalry or piety).
Returns
The highest available melee prayer, or null if none is available.
getMeleeStrengthPrayer()static
public static PrayerAPI getMeleeStrengthPrayer()Returns the highest available melee strength prayer for the given client.
Returns
The highest available melee attack prayer, or null if none is available.
getOffensivePrayers()static
public static List<PrayerAPI> getOffensivePrayers()Selects the configured available offense for the current weapon family.
getOffensivePrayers(CombatAttackStyle)static
public static List<PrayerAPI> getOffensivePrayers(CombatAttackStyle style)Selects the shared configured offense for an explicit combat family.
Parameters
style- Style.
getQuickPrayerIndex()
public int getQuickPrayerIndex()The prayer's place in the quick-prayer list.
getRangedPrayer()static
public static PrayerAPI getRangedPrayer()Returns the highest available ranged prayer for the given client.
Returns
The highest available ranged prayer, or null if none is available.
getVarbit()
public int getVarbit()The varbit that says whether the prayer is on.
hasLevelFor()
public boolean hasLevelFor()Check if the player has the level for this prayer.
Returns
Bool.
isActive()
public boolean isActive()Checks if the prayer is active for the given client.
Returns
True if the prayer is active.
isAvailable()
public boolean isAvailable()Whether this prayer is unlocked, unreplaced and within the player's prayer level.
isQuickPrayer()
public boolean isQuickPrayer()Check if this prayer is set as a quick prayer.
Returns
Bool.
isQuickPrayerEnabled()static
public static boolean isQuickPrayerEnabled()Check if the quick prayers are enabled currently.
Returns
Bool.
isQuickPrayerFlickSuppressed()static
public static boolean isQuickPrayerFlickSuppressed()Whether the client holds quick-prayer flicks back right now.
manage(PrayerAPI$Mode, Collection<PrayerAPI>)static
public static boolean manage(PrayerAPI$Mode mode, Collection<PrayerAPI> prayers)Applies one tick of the native prayer policy.
No thread is blocked while flicking.
Parameters
mode- Mode.
prayers- Prayers.
setQuickPrayer(PrayerAPI...)static
public static void setQuickPrayer(PrayerAPI... prayers)Set the quick prayers.
Parameters
prayers- Prayers.
setQuickPrayerFlickSuppressed(boolean)static
public static void setQuickPrayerFlickSuppressed(boolean suppressed)Allows an encounter handler to suspend the generic quick-prayer flicker.
Parameters
suppressed- Suppressed.
stopManaging()static
public static void stopManaging()Stops pending flicks and disables managed prayers according to the shared manual-prayer preference.
stopManagingAfterInputCancellation()static
public static void stopManagingAfterInputCancellation()Finish owned prayer cleanup after the caller cancelled its mouse session's queued input.
stopQuickPrayerFlick()static
public static void stopQuickPrayerFlick()Cancels the delayed phase and turns quick prayers off without toggling an already queued off back on.
switchOffensivePrayers()static
public static void switchOffensivePrayers()Switch weapon offense while retaining active protection and utility prayers.
toggle()
public void toggle()Toggles the prayer for the given client, only if the player meets the level requirements.
toggle(PrayerAPI)static
public static void toggle(PrayerAPI prayer)Turns these prayers on.
Parameters
prayer- Prayer.
toggle(PrayerAPI...)static
public static void toggle(PrayerAPI... prayers)Turns these prayers on.
Parameters
prayers- Prayers.
toggleQuickPrayer()static
public static void toggleQuickPrayer()Toggle quick prayer activation.
turnOff()
public void turnOff()Turns off the prayer for the given client if it's currently active.
turnOffQuickPrayers()static
public static void turnOffQuickPrayers()Turn off quick prayers.
turnOn()
public void turnOn()Turns on the prayer for the given client if it's not already active.
turnOnQuickPrayers()static
public static void turnOnQuickPrayers()Turn quick prayer on.
Also allowed
Every enum has these, as in plain Java.
compareTo, equals, hashCode, name, ordinal, toString, valueOf, values