From c4092f9f36ef2d6a1914ee5ef606522d35e14cdc Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Wed, 5 Jul 2023 12:29:49 +0200 Subject: mirror verse jump and run (#265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: Roman / Linnea Gräf --- .../at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test') diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt index d7b1b0029..0ec54b3a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt @@ -152,11 +152,18 @@ class SkyHanniTestCommand { LorenzUtils.chat("§e[SkyHanni] stopped ${modules.size} listener classes.") } - fun copyLocation() { + fun copyLocation(args: Array) { val location = LocationUtils.playerLocation() - val x = LorenzUtils.formatDouble(location.x) - val y = LorenzUtils.formatDouble(location.y) - val z = LorenzUtils.formatDouble(location.z) + val x = LorenzUtils.formatDouble(location.x + 0.001).replace(",", ".") + val y = LorenzUtils.formatDouble(location.y + 0.001).replace(",", ".") + val z = LorenzUtils.formatDouble(location.z + 0.001).replace(",", ".") + if (args.size == 1) { + if (args[0].equals("json", false)) { + OSUtils.copyToClipboard("\"$x:$y:$z\"") + return + } + } + OSUtils.copyToClipboard("LorenzVec($x, $y, $z)") } } -- cgit