aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-16 11:06:16 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-16 11:06:16 +0200
commit7a76f1d424ac95fcdc91e51294dbf103d558045d (patch)
tree1894cec140538f77b02766bed563f7bbc79c6fc6 /src/main/java/at
parent41898a154567e77d16cfcae98fe49f66e287241c (diff)
downloadskyhanni-7a76f1d424ac95fcdc91e51294dbf103d558045d.tar.gz
skyhanni-7a76f1d424ac95fcdc91e51294dbf103d558045d.tar.bz2
skyhanni-7a76f1d424ac95fcdc91e51294dbf103d558045d.zip
Added debug command /shtestisland
Diffstat (limited to 'src/main/java/at')
-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)
}