Class PrayerService


  • public class PrayerService
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PrayerService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activatePrayer​(net.runelite.api.Prayer prayer)
      Wrapper method which turns a prayer on.
      void deactivateAll()  
      boolean deactivateAll​(boolean keepPreserve)  
      boolean deactivateAll​(boolean keepPreserveOn, boolean onlyProtectionPrayers, int maxActions)  
      boolean deactivatePrayer​(net.runelite.api.Prayer prayer)
      Wrapper method which turns a prayer off.
      void deactivateProtectionPrayers()  
      boolean isActive​(net.runelite.api.Prayer prayer)
      Returns true if the prayer is active and false otherwise.
      boolean isOutOfPrayer()
      Checks if the player is out of prayer.
      boolean isQuickPrayerSet​(InteractablePrayer prayer)
      Checks if a given quick prayer is set
      void oneTickFlick​(boolean disableAll, net.runelite.api.Prayer... prayers)  
      boolean toggle​(net.runelite.api.Prayer prayer)
      Toggles a prayer on or off.
      boolean toggle​(net.runelite.api.Prayer prayer, boolean activate)
      Toggles a prayer on or off.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrayerService

        public PrayerService()
    • Method Detail

      • activatePrayer

        public void activatePrayer​(net.runelite.api.Prayer prayer)
        Wrapper method which turns a prayer on.
        Parameters:
        prayer - The prayer to turn on.
      • deactivatePrayer

        public boolean deactivatePrayer​(net.runelite.api.Prayer prayer)
        Wrapper method which turns a prayer off.
        Parameters:
        prayer - The prayer to turn off.
        Returns:
        Boolean true if the prayer was activated/deactivated successfully and false otherwise.
      • toggle

        public boolean toggle​(net.runelite.api.Prayer prayer)
        Toggles a prayer on or off. This will use reflection based prayer toggles by default.
        Parameters:
        prayer - The Prayer to toggle
        Returns:
        Boolean true if the prayer was activated/deactivated successfully and false otherwise.
      • toggle

        public boolean toggle​(net.runelite.api.Prayer prayer,
                              boolean activate)
        Toggles a prayer on or off.
        Parameters:
        prayer - The Prayer to toggle
        activate - True if the prayer should be turned on and false if it should be turned off
        Returns:
        Boolean true if the prayer was activated/deactivated successfully and false otherwise.
      • isActive

        public boolean isActive​(net.runelite.api.Prayer prayer)
        Returns true if the prayer is active and false otherwise.
        Parameters:
        prayer - Prayer to check.
        Returns:
        Boolean true if the prayer is active (on) and false otherwise.
      • deactivateAll

        public boolean deactivateAll​(boolean keepPreserveOn,
                                     boolean onlyProtectionPrayers,
                                     int maxActions)
      • deactivateAll

        public boolean deactivateAll​(boolean keepPreserve)
      • deactivateAll

        public void deactivateAll()
      • deactivateProtectionPrayers

        public void deactivateProtectionPrayers()
      • oneTickFlick

        public void oneTickFlick​(boolean disableAll,
                                 net.runelite.api.Prayer... prayers)
      • isQuickPrayerSet

        public boolean isQuickPrayerSet​(InteractablePrayer prayer)
        Checks if a given quick prayer is set
        Parameters:
        prayer - The quick prayer to check
        Returns:
        True if the quick prayer is set and false otherwise
      • isOutOfPrayer

        public boolean isOutOfPrayer()
        Checks if the player is out of prayer.
        Returns:
        Returns true if the player is out of prayer and false if they still have prayer.