From 25a99b8a3cb0ccd420dbf9cc8391c908770cae5b Mon Sep 17 00:00:00 2001 From: BlueFox Date: Tue, 21 May 2024 14:50:11 +0200 Subject: [PATCH] Did some refactoring of code; also added support for name color changes of operators --- pom.xml | 2 +- .../displaynamecolor/ChatColorCommand.java | 33 ++++++++++++++----- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 920e9ab..478238a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.privacynerd ChatBeautifier - 0.2.3 + 0.2.4 jar ChatBeautifier diff --git a/src/main/java/de/privacynerd/chatbeautifier/displaynamecolor/ChatColorCommand.java b/src/main/java/de/privacynerd/chatbeautifier/displaynamecolor/ChatColorCommand.java index dda96d6..59e7334 100644 --- a/src/main/java/de/privacynerd/chatbeautifier/displaynamecolor/ChatColorCommand.java +++ b/src/main/java/de/privacynerd/chatbeautifier/displaynamecolor/ChatColorCommand.java @@ -94,14 +94,19 @@ public class ChatColorCommand implements CommandExecutor { ArrayList colorNames = ChatColorUtils.getChooseColorStrings(); // now compose the message containing all possible color args - Component message = Component.text("Mögliche Farben: ").decoration(TextDecoration.BOLD, true); + Component message = Component.text("Mögliche Farben: ") + .decoration(TextDecoration.BOLD, true); - String newMessageItem = colorNames.get(0).toLowerCase().replace(" ", "-") + ", "; - message = message.append(Component.text(newMessageItem, NamedTextColor.GRAY).decoration(TextDecoration.BOLD, true)); + String newMessageItem = colorNames.get(0).toLowerCase().replace(" ", "-"); + message = message.append(Component.text(newMessageItem, NamedTextColor.GRAY) + .decoration(TextDecoration.BOLD, false) + .decoration(TextDecoration.ITALIC, true)); for (int i=1; i 1) { // print a help string if more than one argument is given ChatBeautifier.INSTANCE.tellPlayer("Verwendung: /" + alias + " [, list, gui]", player);