From 005cb0d3a44b27da1b0370991839bc17973d524d Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Wed, 10 May 2023 18:00:24 +0700 Subject: [PATCH] i forgor secondary --- .../chipmunkbot/commands/HelpCommand.java | 2 +- .../chipmunkbot/commands/InfoCommand.java | 4 ++-- .../chipmunkbot/commands/MusicCommand.java | 4 ++-- .../chipmunkbot/commands/NetMsgCommand.java | 2 +- .../chipmunkbot/plugins/SongPlayer.java | 18 +++++++++--------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/land/chipmunk/chipmunkbot/commands/HelpCommand.java b/src/main/java/land/chipmunk/chipmunkbot/commands/HelpCommand.java index 8e6cc9c..cc2f164 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/commands/HelpCommand.java +++ b/src/main/java/land/chipmunk/chipmunkbot/commands/HelpCommand.java @@ -93,7 +93,7 @@ public class HelpCommand { usages.add( Component .text(node.getName()) - .color(TextColor.fromHexString("#c95367")) + .color(TextColor.fromHexString(config.color().secondary())) .append(Component.space()) .append( Component diff --git a/src/main/java/land/chipmunk/chipmunkbot/commands/InfoCommand.java b/src/main/java/land/chipmunk/chipmunkbot/commands/InfoCommand.java index 64f91fa..9772894 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/commands/InfoCommand.java +++ b/src/main/java/land/chipmunk/chipmunkbot/commands/InfoCommand.java @@ -44,7 +44,7 @@ public class InfoCommand { .append(Component.text(" - A utility bot for free-operator servers with minimal or no restrictions", NamedTextColor.GRAY)) .append(Component.newline()) .append(Component.text("Made by ", NamedTextColor.GRAY)) - .append(Component.text("_ChipMC_", TextColor.fromHexString("#c95367"))) + .append(Component.text("_ChipMC_", TextColor.fromHexString(client.config().color().secondary()))) .append(Component.text(" and contributors", NamedTextColor.GRAY)) .append(Component.newline()) .append(Component.text("Original Repository: ", NamedTextColor.GRAY)) @@ -107,7 +107,7 @@ public class InfoCommand { return Component.translatable( "%s: %s", key.color(TextColor.fromHexString(client.config().color().primary())), - value.color(TextColor.fromHexString("#c95367")) + value.color(TextColor.fromHexString(client.config().color().secondary())) ); } diff --git a/src/main/java/land/chipmunk/chipmunkbot/commands/MusicCommand.java b/src/main/java/land/chipmunk/chipmunkbot/commands/MusicCommand.java index 90b0cbf..9f72186 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/commands/MusicCommand.java +++ b/src/main/java/land/chipmunk/chipmunkbot/commands/MusicCommand.java @@ -158,7 +158,7 @@ public class MusicCommand { final File file = new File(directory, filename); if (!file.isDirectory()) continue; - final TextColor color = (i++ & 1) == 0 ? TextColor.fromHexString("#c95367") : TextColor.fromHexString(client.config().color().primary()); + final TextColor color = (i++ & 1) == 0 ? TextColor.fromHexString(client.config().color().secondary()) : TextColor.fromHexString(client.config().color().primary()); final Path relativeFilepath = Path.of(relativePath, filename); final String escapedPath = escapePath(relativeFilepath.toString()); @@ -174,7 +174,7 @@ public class MusicCommand { final File file = new File(directory, filename); if (file.isDirectory()) continue; - final TextColor color = (i++ & 1) == 0 ? TextColor.fromHexString("#c95367") : TextColor.fromHexString(client.config().color().primary()); + final TextColor color = (i++ & 1) == 0 ? TextColor.fromHexString(client.config().color().secondary()) : TextColor.fromHexString(client.config().color().primary()); final Path relativeFilepath = Path.of(relativePath, filename); final String escapedPath = escapePath(relativeFilepath.toString()); diff --git a/src/main/java/land/chipmunk/chipmunkbot/commands/NetMsgCommand.java b/src/main/java/land/chipmunk/chipmunkbot/commands/NetMsgCommand.java index 594432a..3b99f6e 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/commands/NetMsgCommand.java +++ b/src/main/java/land/chipmunk/chipmunkbot/commands/NetMsgCommand.java @@ -37,7 +37,7 @@ public class NetMsgCommand { final Component message = Component.translatable( "[%s] %s \u203a %s", Component.text(client.session().getHost() + ":" + client.session().getPort(), NamedTextColor.GRAY), - Component.empty().color(TextColor.fromHexString("#c95367")).append(source.displayName()), + Component.empty().color(TextColor.fromHexString(client.config().color().secondary())).append(source.displayName()), Component.text(input, NamedTextColor.GRAY) ).color(NamedTextColor.DARK_GRAY); diff --git a/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java b/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java index 505c01c..13b1c6b 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java +++ b/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java @@ -55,7 +55,7 @@ public class SongPlayer extends SessionAdapter { try { final SongLoaderThread _loaderThread = new SongLoaderThread(location); - client.chat().tellraw(Component.translatable("Loading %s", Component.text(location.getFileName().toString(), TextColor.fromHexString("#c95367"))).color(TextColor.fromHexString(client.config().color().primary()))); + client.chat().tellraw(Component.translatable("Loading %s", Component.text(location.getFileName().toString(), TextColor.fromHexString(client.config().color().secondary()))).color(TextColor.fromHexString(client.config().color().primary()))); _loaderThread.start(); loaderThread = _loaderThread; } catch (SongLoaderException e) { @@ -72,7 +72,7 @@ public class SongPlayer extends SessionAdapter { try { final SongLoaderThread _loaderThread = new SongLoaderThread(location); - client.chat().tellraw(Component.translatable("Loading %s", Component.text(location.toString(), TextColor.fromHexString("#c95367"))).color(TextColor.fromHexString(client.config().color().primary()))); + client.chat().tellraw(Component.translatable("Loading %s", Component.text(location.toString(), TextColor.fromHexString(client.config().color().secondary()))).color(TextColor.fromHexString(client.config().color().primary()))); _loaderThread.start(); loaderThread = _loaderThread; } catch (SongLoaderException e) { @@ -93,7 +93,7 @@ public class SongPlayer extends SessionAdapter { client.chat().tellraw(Component.translatable("Failed to load song: %s", loaderThread.exception.message()).color(NamedTextColor.RED)); } else { songQueue.add(loaderThread.song); - client.chat().tellraw(Component.translatable("Added %s to the song queue", Component.empty().append(loaderThread.song.name).color(TextColor.fromHexString("#c95367"))).color(TextColor.fromHexString(client.config().color().primary()))); + client.chat().tellraw(Component.translatable("Added %s to the song queue", Component.empty().append(loaderThread.song.name).color(TextColor.fromHexString(client.config().color().secondary()))).color(TextColor.fromHexString(client.config().color().primary()))); } loaderThread = null; } @@ -102,7 +102,7 @@ public class SongPlayer extends SessionAdapter { if (songQueue.size() == 0) return; currentSong = songQueue.poll(); - client.chat().tellraw(Component.translatable("Now playing %s", Component.empty().append(currentSong.name).color(TextColor.fromHexString("#c95367"))).color(TextColor.fromHexString(client.config().color().primary()))); + client.chat().tellraw(Component.translatable("Now playing %s", Component.empty().append(currentSong.name).color(TextColor.fromHexString(client.config().color().secondary()))).color(TextColor.fromHexString(client.config().color().primary()))); currentSong.play(); } @@ -116,14 +116,14 @@ public class SongPlayer extends SessionAdapter { handlePlaying(); if (currentSong.finished()) { - client.chat().tellraw(Component.translatable("Finished playing %s", Component.empty().append(currentSong.name).color(TextColor.fromHexString("#c95367"))).color(TextColor.fromHexString(client.config().color().primary()))); + client.chat().tellraw(Component.translatable("Finished playing %s", Component.empty().append(currentSong.name).color(TextColor.fromHexString(client.config().color().secondary()))).color(TextColor.fromHexString(client.config().color().primary()))); currentSong = null; } } public Component generateActionbar () { Component component = Component.empty() - .append(Component.translatable("Now playing %s", Component.empty().append(currentSong.name).color(TextColor.fromHexString("#c95367"))).color(TextColor.fromHexString(client.config().color().primary()))) + .append(Component.translatable("Now playing %s", Component.empty().append(currentSong.name).color(TextColor.fromHexString(client.config().color().secondary()))).color(TextColor.fromHexString(client.config().color().primary()))) .append(Component.translatable(" | ", NamedTextColor.DARK_GRAY)) .append(Component.translatable("%s / %s", formatTime(currentSong.time).color(TextColor.fromHexString(client.config().color().primary())), formatTime(currentSong.length).color(TextColor.fromHexString(client.config().color().primary()))).color(NamedTextColor.GRAY)) .append(Component.translatable(" | ", NamedTextColor.DARK_GRAY)) @@ -132,19 +132,19 @@ public class SongPlayer extends SessionAdapter { if (currentSong.paused) { return component .append(Component.translatable(" | ", NamedTextColor.DARK_GRAY)) - .append(Component.translatable("Paused", TextColor.fromHexString("#c95367"))); + .append(Component.translatable("Paused", TextColor.fromHexString(client.config().color().secondary()))); } if (currentSong.looping) { if (currentSong.loopCount > 0) { return component .append(Component.translatable(" | ", NamedTextColor.DARK_GRAY)) - .append(Component.translatable("Looping (%s/%s)", Component.text(currentSong.currentLoop), Component.text(currentSong.loopCount)).color(TextColor.fromHexString("#c95367"))); + .append(Component.translatable("Looping (%s/%s)", Component.text(currentSong.currentLoop), Component.text(currentSong.loopCount)).color(TextColor.fromHexString(client.config().color().secondary()))); } return component .append(Component.translatable(" | ", NamedTextColor.DARK_GRAY)) - .append(Component.translatable("Looping", TextColor.fromHexString("#c95367"))); + .append(Component.translatable("Looping", TextColor.fromHexString(client.config().color().secondary()))); } return component;