aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt5
3 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt
index 183238762..09dad822c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.commands
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.MessageSendToServerEvent
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -14,7 +15,7 @@ class WarpIsCommand {
if (event.message.lowercase() == "/warp is") {
event.isCanceled = true
- LorenzUtils.sendCommandToServer("/is")
+ ChatUtils.sendCommandToServer("is")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt
index 34f42e629..f8a156644 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt
@@ -200,4 +200,8 @@ object ChatUtils {
fun sendMessageToServer(message: String) {
sendQueue.add(message)
}
+
+ fun sendCommandToServer(command: String) {
+ sendMessageToServer("/$command")
+ }
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index eafcc3fef..27b6a1d9d 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -331,7 +331,10 @@ object LorenzUtils {
}
fun sendCommandToServer(command: String) {
- ChatUtils.sendMessageToServer("/$command")
+ if (command.startsWith("/")) {
+ ChatUtils.debug("Sending wrong command to server? ($command)")
+ }
+ ChatUtils.sendCommandToServer(command)
}
/**