aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-04-18 22:33:59 +0200
committerGitHub <noreply@github.com>2024-04-18 22:33:59 +0200
commit3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d (patch)
tree293e81a8cf29314b508999975f1507b279284bc8 /src/main/java/at/hannibal2/skyhanni/features/misc
parent9ed4a9462f0e494001cbe470477624c3dd73053a (diff)
downloadskyhanni-3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d.tar.gz
skyhanni-3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d.tar.bz2
skyhanni-3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d.zip
Cleanup (#1485)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt3
5 files changed, 11 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt
index 50ce4be9d..d9df6321b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt
@@ -25,7 +25,7 @@ class MovementSpeedDisplay {
/**
* This speed value represents the movement speed in blocks per second.
* This has nothing to do with the speed stat.
- */
+ */
var speed = 0.0
var usingSoulsandSpeed = false
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
index 4bdcd4a3b..f5bd15750 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
@@ -105,11 +105,12 @@ object AdvancedPlayerList {
playerData.nameSuffix = ""
}
} catch (e: NumberFormatException) {
- ErrorManager.logErrorWithData(e, "Advanced Player List failed to parse user name",
+ ErrorManager.logErrorWithData(
+ e, "Advanced Player List failed to parse user name",
"line" to line,
"i" to i,
"original" to original,
- )
+ )
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt
index 9f4fb8c78..32cfd0133 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt
@@ -149,9 +149,12 @@ object LimboTimeTracker {
val limboPB: Int = if (currentPB < timeInLimbo) timeInLimbo else currentPB
var luckString = tryTruncateFloat(userLuck.round(2))
if (userLuck > 0) luckString = "+$luckString"
- var firstMessage = "§fYour current PB is §e${limboPB.seconds}§f, granting you §a$luckString✴ SkyHanni User Luck§f!"
+ var firstMessage =
+ "§fYour current PB is §e${limboPB.seconds}§f, granting you §a$luckString✴ SkyHanni User Luck§f!"
val secondMessage = "§fYou have §e${playtime.seconds} §fof playtime!"
- if ((userLuck == Float.POSITIVE_INFINITY) || (userLuck == Float.NEGATIVE_INFINITY)) firstMessage = "$firstMessage §Zwhat"
+ if (userLuck == Float.POSITIVE_INFINITY || userLuck == Float.NEGATIVE_INFINITY) {
+ firstMessage = "$firstMessage §Zwhat"
+ }
ChatUtils.chat(firstMessage)
ChatUtils.chat(secondMessage)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
index fa2f5c551..cac99316f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
@@ -24,7 +24,7 @@ class TeleportPadCompactName {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderLivingB(event: SkyHanniRenderEntityEvent.Specials.Pre<EntityLivingBase>) {
- if (!IslandType.PRIVATE_ISLAND.isInIsland()) return
+ if (!IslandType.PRIVATE_ISLAND.isInIsland()) return
if (!SkyHanniMod.feature.misc.teleportPad.compactName) return
val entity = event.entity
if (entity !is EntityArmorStand) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
index e41803ffb..6761fe74d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
@@ -491,8 +491,7 @@ open class VisualWordGui : GuiScreen() {
else if (KeyboardManager.isDeleteWordDown()) {
val lastSpaceIndex = currentText.trimEnd().removeSuffix(" ").lastIndexOf(' ')
if (lastSpaceIndex >= 0) currentText.substring(0, lastSpaceIndex + 1) else ""
- }
- else {
+ } else {
currentText.substring(0, currentText.length - 1)
}
saveTextChanges()