aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt10
5 files changed, 12 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
index 9aa58f45b..289c9c58b 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
@@ -249,7 +249,11 @@ object MiningAPI {
}
event.addData {
- add("lastInitSound: ${lastInitSound.passedSince().format()}")
+ if (lastInitSound.isFarPast()) {
+ add("lastInitSound: never")
+ } else {
+ add("lastInitSound: ${lastInitSound.passedSince().format()}")
+ }
add("waitingForInitSound: $waitingForInitSound")
add("waitingForInitBlock: $waitingForInitBlock")
add("waitingForInitBlockPos: $waitingForInitBlockPos")
diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt
index d7dce85c7..6ef6861f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt
@@ -10,6 +10,6 @@ open class AbstractChatEvent(
var chatComponent: IChatComponent,
var blockedReason: String? = null,
) : LorenzEvent() {
- val message by lazy { messageComponent.getText() }
+ val message by lazy { messageComponent.getText().removePrefix("§r") }
val author by lazy { authorComponent.getText() }
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt
index 18750bff5..7a93d528d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt
@@ -83,7 +83,7 @@ object CorpseLocator {
@SubscribeEvent
fun onWorldChange(event: LorenzWorldChangeEvent) {
- if (sharedWaypoints.isNotEmpty()) sharedWaypoints.clear()
+ sharedWaypoints.clear()
}
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt
index 53b0fa001..7476e212b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt
@@ -26,7 +26,7 @@ object MineshaftWaypoints {
private const val BLOCKS_FORWARD: Int = 7
- val waypoints: MutableList<MineshaftWaypoint> = mutableListOf()
+ val waypoints = mutableListOf<MineshaftWaypoint>()
private var timeLastShared = SimpleTimeMark.farPast()
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt
index 38db097a2..5b36d1863 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt
@@ -56,16 +56,14 @@ object TestChatCommand {
val event = LorenzChatEvent(message, componentText)
event.postAndCatch()
+ if (isHidden) return
+
if (event.blockedReason != "") {
- if (!isHidden) {
- ChatUtils.chat("§cChat blocked: ${event.blockedReason}")
- }
+ ChatUtils.chat("§cChat blocked: ${event.blockedReason}")
} else {
val finalMessage = event.chatComponent
if (finalMessage.formattedText.stripHypixelMessage() != message) {
- if (!isHidden) {
- ChatUtils.chat("§eChat modified!")
- }
+ ChatUtils.chat("§eChat modified!")
}
ChatUtils.chat(finalMessage)
}