diff options
Diffstat (limited to 'src/main/java')
81 files changed, 271 insertions, 91 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt index ba8e42d66..95e39d1f7 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt @@ -324,7 +324,14 @@ object SkillAPI { val nextLevelDiff = levelArray.getOrNull(level)?.toDouble() ?: 7_600_000.0 val nextLevelProgress = nextLevelDiff * xpPercentage / 100 val totalXp = levelXp + nextLevelProgress - updateSkillInfo(existingLevel, level, nextLevelProgress.toLong(), nextLevelDiff.toLong(), totalXp.toLong(), matcher.group("gained")) + updateSkillInfo( + existingLevel, + level, + nextLevelProgress.toLong(), + nextLevelDiff.toLong(), + totalXp.toLong(), + matcher.group("gained"), + ) } else { val exactLevel = getLevelExact(needed) val levelXp = calculateLevelXp(existingLevel.level - 1).toLong() + current @@ -468,7 +475,9 @@ object SkillAPI { val skill = storage?.get(skillType) ?: return if (targetLevel <= skill.overflowLevel) { - ChatUtils.userError("Custom goal level ($targetLevel) must be greater than your current level (${skill.overflowLevel}).") + ChatUtils.userError( + "Custom goal level ($targetLevel) must be greater than your current level (${skill.overflowLevel})." + ) return } diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt index b00fc7a8f..24a3748c6 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt @@ -151,7 +151,10 @@ class ConfigManager { } if (missingConfigLink) { println("") - println("This crash is here to remind you to fix the missing @ConfigLink annotation over your new config position config element.") + println( + "This crash is here to remind you to fix the missing " + + "@ConfigLink annotation over your new config position config element." + ) println("") println("Steps to fix:") println("1. Search for `WEE WOO WEE WOO` in the console output.") diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index c9ae8c2c7..f6d6c72de 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -81,7 +81,10 @@ object ConfigUpdaterMigrator { } val newParentElement = new.at(np.dropLast(1), true) if (newParentElement !is JsonObject) { - logger.log("Catastrophic: element at path $old could not be relocated to $new, since another element already inhabits that path") + logger.log( + "Catastrophic: element at path $old could not be relocated to $new, " + + "since another element already inhabits that path" + ) return } movesPerformed++ diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 208beafe4..89f314135 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -174,8 +174,8 @@ object Commands { callback { GhostUtil.importCTGhostCounterData() } } event.register("shcroptime") { - description = "Calculates with your current crop per second speed " + - "how long you need to farm a crop to collect this amount of items" + description = + "Calculates with your current crop per second speed " + "how long you need to farm a crop to collect this amount of items" category = CommandCategory.USERS_ACTIVE callback { GardenCropTimeCommand.onCommand(it) } } @@ -205,8 +205,9 @@ object Commands { callback { FarmingWeightDisplay.lookUpCommand(it) } } event.register("shcopytranslation") { - description = "Copy the translation of a message in another language to your clipboard.\n" + - "Uses a language code that can be found at the end of a translation message." + description = + "Copy the translation of a message in another language to your clipboard.\n" + + "Uses a 2 letter language code that can be found at the end of a translation message." category = CommandCategory.USERS_ACTIVE callback { Translator.fromNativeLanguage(it) } } @@ -585,7 +586,8 @@ object Commands { callback { ItemPriceUtils.debugItemPrice(it) } } event.register("shdebugscoreboard") { - description = "Monitors the scoreboard changes: " + + description = + "Monitors the scoreboard changes: " + "Prints the raw scoreboard lines in the console after each update, with time since last update." category = CommandCategory.DEVELOPER_DEBUG callback { ScoreboardData.toggleMonitor() } @@ -740,7 +742,8 @@ object Commands { callback { TitleManager.command(it) } } event.register("shresetconfig") { - description = "Reloads the config manager and rendering processors of MoulConfig. " + + description = + "Reloads the config manager and rendering processors of MoulConfig. " + "This §cWILL RESET §7your config, but also updating the java config files " + "(names, description, orderings and stuff)." category = CommandCategory.DEVELOPER_TEST diff --git a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt index e9e58fa46..022a18d92 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt @@ -68,7 +68,8 @@ object BitsAPI { private val bitsFromFameRankUpChatPattern by bitsChatGroup.pattern( "rankup.bits", - "§eYou gained §3(?<amount>.*) Bits Available §ecompounded from all your §epreviously eaten §6cookies§e! Click here to open §6cookie menu§e!", + "§eYou gained §3(?<amount>.*) Bits Available §ecompounded from all your " + + "§epreviously eaten §6cookies§e! Click here to open §6cookie menu§e!", ) private val fameRankUpPattern by bitsChatGroup.pattern( diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt index 965b4af57..878056192 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt @@ -38,7 +38,9 @@ object ChatManager { private val loggerFilteredTypes = mutableMapOf<String, LorenzLogger>() private val messageHistory = object : LinkedHashMap<IdentityCharacteristics<IChatComponent>, MessageFilteringResult>() { - override fun removeEldestEntry(eldest: MutableMap.MutableEntry<IdentityCharacteristics<IChatComponent>, MessageFilteringResult>?): Boolean { + override fun removeEldestEntry( + eldest: MutableMap.MutableEntry<IdentityCharacteristics<IChatComponent>, MessageFilteringResult>?, + ): Boolean { return size > 100 } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index 7581b3b1e..24dacafbd 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -49,10 +49,12 @@ object SackAPI { "sack", "^(.* Sack|Enchanted .* Sack)\$", ) + @Suppress("MaxLineLength") private val numPattern by patternGroup.pattern( "number", "(?:(?:§[0-9a-f](?<level>I{1,3})§7:)?|(?:§7Stored:)?) (?<color>§[0-9a-f])(?<stored>[0-9.,kKmMbB]+)§7/(?<total>\\d+(?:[0-9.,]+)?[kKmMbB]?)", ) + @Suppress("MaxLineLength") private val gemstonePattern by patternGroup.pattern( "gemstone", " §[0-9a-f](?<gemrarity>[A-z]*): §[0-9a-f](?<stored>\\d+(?:\\.\\d+)?(?:(?:,\\d+)?)+[kKmM]?)(?: §[0-9a-f]\\(\\d+(?:\\.\\d+)?(?:(?:,\\d+)?)+[kKmM]?\\))?", diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt index b6c0e16f9..5199e8b7e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt @@ -88,6 +88,7 @@ object PlayerChatManager { * REGEX-TEST: §b[MVP§c+§b] hannibal2§f§7 has §8[§6Heroic Aspect of the Void§8] * REGEX-TEST: §8[§b209§8] §b[MVP§d+§b] lrg89§f§7 is holding §8[§5Heroic Aspect of the Void§8] */ + @Suppress("MaxLineLength") private val itemShowPattern by patternGroup.pattern( "itemshow", "(?:§8\\[(?<levelColor>§.)(?<level>\\d+)§8] )?(?<author |
