summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/command
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-02-20 00:59:39 +1100
committerGitHub <noreply@github.com>2024-02-19 14:59:39 +0100
commitc19a902d2ef4aa93ff2d3cc93230f067e9315b71 (patch)
tree588e197fa91adc383223948d003db565b5e9f5a5 /src/main/java/at/hannibal2/skyhanni/test/command
parentab769839034888bc10ddfb2ef815be2400d64641 (diff)
downloadskyhanni-c19a902d2ef4aa93ff2d3cc93230f067e9315b71.tar.gz
skyhanni-c19a902d2ef4aa93ff2d3cc93230f067e9315b71.tar.bz2
skyhanni-c19a902d2ef4aa93ff2d3cc93230f067e9315b71.zip
Created ActionBarUpdateEvent and used it. #977
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/command')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyActionBarCommand.kt20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyActionBarCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyActionBarCommand.kt
new file mode 100644
index 000000000..2f07483b2
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyActionBarCommand.kt
@@ -0,0 +1,20 @@
+package at.hannibal2.skyhanni.test.command
+
+import at.hannibal2.skyhanni.data.ActionBarData
+import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.OSUtils
+import at.hannibal2.skyhanni.utils.StringUtils.removeColor
+
+object CopyActionBarCommand {
+ fun command(args: Array<String>) {
+ val noFormattingCodes = args.size == 1 && args[0] == "true"
+
+ val status = if (noFormattingCodes) "without" else "with"
+
+ var actionBar = ActionBarData.getActionBar()
+ if (noFormattingCodes) actionBar = actionBar.removeColor()
+
+ OSUtils.copyToClipboard(actionBar)
+ ChatUtils.chat("Action bar name copied to clipboard $status formatting codes!")
+ }
+}