Package rs.kreme.ksbot.api.game
Class Prayer
- java.lang.Object
- 
- rs.kreme.ksbot.api.game.Prayer
 
- 
 public class Prayer extends java.lang.ObjectThis class handles the player's prayer functionality, allowing for enabling/disabling specific prayers, checking prayer status, and retrieving the current prayer points. Additionally, it now includes methods for retrieving enabled prayers and managing quick prayers.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classPrayer.PrayerbookEnum representing the different prayer books.static classPrayer.Prayers
 - 
Constructor SummaryConstructors Constructor Description Prayer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Prayer.PrayersbestMagicPrayer()Determines the best magic prayer available to the player based on their Prayer and Defence levels and unlock status of Augury.Prayer.PrayersbestRangedPrayer()Determines the best ranged prayer available to the player based on their Prayer and Defence levels and unlock status of Rigour.Prayer.PrayersbestStrengthPrayer()Determines the best strength prayer available to the player based on their Prayer and Defence levels and unlock status of Chivalry and Piety.voiddisable(Prayer.Prayers... prayers)Disables the provided prayers, ensuring that they are not already disabled.voiddisableAll()voidenable(Prayer.Prayers... prayers)Enables the provided prayers, ensuring that they are not already enabled.java.util.List<Prayer.Prayers>getEnabledPrayers()Determines the currently enabled prayers.java.util.Set<Prayer.Prayers>getEnabledQuickPrayers()Determines the currently enabled quick prayers.intgetPercentLeft()Gets the player's current prayer points percentage.intgetPoints()Gets the player's current prayer points.booleanisEnabled(Prayer.Prayers prayer)Checks if a specific prayer is currently enabled.booleanisPrayerSelected(Prayer.Prayers prayer)voidquickPrayer(boolean enable)Toggles the Quick Prayer functionality based on the specified state.voidremoveQuickPrayers(boolean close, Prayer.Prayers... prayers)Removes the specified prayers from quick prayer functionality only if they are currently set.voidselectQuickPrayers(boolean close, Prayer.Prayers... prayers)Selects the specified prayers for quick prayer functionality only if they are not already set.
 
- 
- 
- 
Method Detail- 
isEnabledpublic boolean isEnabled(Prayer.Prayers prayer) Checks if a specific prayer is currently enabled.- Parameters:
- prayer- The prayer to check.
- Returns:
- True if enabled, false otherwise.
 
 - 
enablepublic void enable(Prayer.Prayers... prayers) Enables the provided prayers, ensuring that they are not already enabled. If the prayer points are 0, no action is taken.- Parameters:
- prayers- The prayers to enable.
 
 - 
disablepublic void disable(Prayer.Prayers... prayers) Disables the provided prayers, ensuring that they are not already disabled.- Parameters:
- prayers- The prayers to disable.
 
 - 
disableAllpublic void disableAll() 
 - 
getPointspublic int getPoints() Gets the player's current prayer points.- Returns:
- The current prayer points.
 
 - 
getPercentLeftpublic int getPercentLeft() Gets the player's current prayer points percentage.- Returns:
- The current prayer points percentage.
 
 - 
quickPrayerpublic void quickPrayer(boolean enable) Toggles the Quick Prayer functionality based on the specified state.- Parameters:
- enable- - If true, enables Quick Prayer; if false, disables it.
 
 - 
getEnabledPrayerspublic java.util.List<Prayer.Prayers> getEnabledPrayers() Determines the currently enabled prayers.- Returns:
- A list of enabled prayers.
 
 - 
getEnabledQuickPrayerspublic java.util.Set<Prayer.Prayers> getEnabledQuickPrayers() Determines the currently enabled quick prayers.- Returns:
- A set of quick prayers currently selected.
 
 - 
isPrayerSelectedpublic boolean isPrayerSelected(Prayer.Prayers prayer) 
 - 
selectQuickPrayerspublic void selectQuickPrayers(boolean close, Prayer.Prayers... prayers)Selects the specified prayers for quick prayer functionality only if they are not already set.- Parameters:
- close- Whether to close the interface after selection.
- prayers- The prayers to select as quick prayers.
 
 - 
removeQuickPrayerspublic void removeQuickPrayers(boolean close, Prayer.Prayers... prayers)Removes the specified prayers from quick prayer functionality only if they are currently set.- Parameters:
- close- Whether to close the interface after removal.
- prayers- The prayers to remove from quick prayers.
 
 - 
bestRangedPrayerpublic Prayer.Prayers bestRangedPrayer() Determines the best ranged prayer available to the player based on their Prayer and Defence levels and unlock status of Rigour.- Returns:
- the best ranged prayer, or null if no suitable prayer is available.
 
 - 
bestStrengthPrayerpublic Prayer.Prayers bestStrengthPrayer() Determines the best strength prayer available to the player based on their Prayer and Defence levels and unlock status of Chivalry and Piety.- Returns:
- the best strength prayer, or null if no suitable prayer is available.
 
 - 
bestMagicPrayerpublic Prayer.Prayers bestMagicPrayer() Determines the best magic prayer available to the player based on their Prayer and Defence levels and unlock status of Augury.- Returns:
- the best magic prayer, or null if no suitable prayer is available.
 
 
- 
 
-