Package com.kraken.api.service.prayer
Class PrayerService
- java.lang.Object
-
- com.kraken.api.service.prayer.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 voidactivatePrayer(net.runelite.api.Prayer prayer)Wrapper method which turns a prayer on.voiddeactivateAll()booleandeactivateAll(boolean keepPreserve)booleandeactivateAll(boolean keepPreserveOn, boolean onlyProtectionPrayers, int maxActions)booleandeactivatePrayer(net.runelite.api.Prayer prayer)Wrapper method which turns a prayer off.voiddeactivateProtectionPrayers()booleanisActive(net.runelite.api.Prayer prayer)Returns true if the prayer is active and false otherwise.booleanisOutOfPrayer()Checks if the player is out of prayer.booleanisQuickPrayerSet(InteractablePrayer prayer)Checks if a given quick prayer is setvoidoneTickFlick(boolean disableAll, net.runelite.api.Prayer... prayers)booleantoggle(net.runelite.api.Prayer prayer)Toggles a prayer on or off.booleantoggle(net.runelite.api.Prayer prayer, boolean activate)Toggles a prayer on or off.
-
-
-
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 toggleactivate- 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.
-
-