From 4593b26296282c85a850b70aab196731247e11e6 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 19 Nov 2023 11:45:11 +0100 Subject: code cleanup --- src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt | 3 +-- src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt b/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt index 6b4362215..b7c1a6f4b 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt @@ -40,7 +40,7 @@ object TestExportTools { val data: JsonElement, ) - fun toJson(key: Key, value: T): String { + private fun toJson(key: Key, value: T): String { return gson.toJson(TestValue(key.name, gson.toJsonTree(value))) } @@ -64,7 +64,6 @@ object TestExportTools { LorenzUtils.chat("Compressed item info copied into the clipboard!") } - inline fun getTestData(category: Key, name: String): T { val reader = InputStreamReader(javaClass.getResourceAsStream("/testdata/${category.name}/$name.json")!!) return fromJson(category, reader) diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt index 277452f5a..0e7bccab6 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt @@ -40,8 +40,8 @@ object ErrorManager { } else { errorMessages[id] } - val name = if (fullErrorMessage) "Ful error" else "Error" - LorenzUtils.userError(errorMessage?.let { + val name = if (fullErrorMessage) "Full error" else "Error" + LorenzUtils.chat(errorMessage?.let { OSUtils.copyToClipboard(it) "$name copied into the clipboard, please report it on the SkyHanni discord!" } ?: "Error id not found!") -- cgit