aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-02-06 09:01:12 +1100
committerGitHub <noreply@github.com>2024-02-05 23:01:12 +0100
commit6ed818521cd2c9e97743881966632488e598c20e (patch)
tree1a1f92cc4feeff03bbc82240c4b86ae610a17842 /src/main/java/at/hannibal2/skyhanni/test
parentab43b1989ebb75d5ca3ddd59a71e6a8879f040b0 (diff)
downloadskyhanni-6ed818521cd2c9e97743881966632488e598c20e.tar.gz
skyhanni-6ed818521cd2c9e97743881966632488e598c20e.tar.bz2
skyhanni-6ed818521cd2c9e97743881966632488e598c20e.zip
Send Mining Island Events (#969)
Added sending mining events to Soopy's API to test for new Mining Event feature. #969
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyBossbarCommand.kt20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyBossbarCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyBossbarCommand.kt
new file mode 100644
index 000000000..cac3ac02f
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyBossbarCommand.kt
@@ -0,0 +1,20 @@
+package at.hannibal2.skyhanni.test.command
+
+import at.hannibal2.skyhanni.data.BossbarData
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.OSUtils
+import at.hannibal2.skyhanni.utils.StringUtils.removeColor
+
+object CopyBossbarCommand {
+ fun command(args: Array<String>) {
+ val noFormattingCodes = args.size == 1 && args[0] == "true"
+ val bossbarName = if (noFormattingCodes) BossbarData.getBossbar().removeColor() else BossbarData.getBossbar()
+ val status = if (noFormattingCodes) "without" else "with"
+ if (bossbarName.isBlank()) {
+ LorenzUtils.chat("Boss bar appears to be blank.")
+ } else {
+ OSUtils.copyToClipboard(bossbarName)
+ LorenzUtils.chat("Boss bar name copied to clipboard $status formatting codes!")
+ }
+ }
+}