From 26e42025415dea0f7da02b3b11c9d3c4682b3d90 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Fri, 15 Jul 2022 12:08:08 +0200 Subject: [PATCH] Fixes/improves some formatting --- .../java/net/knarcraft/paidsigns/command/ListCommand.java | 6 +++--- src/main/resources/strings.yml | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java b/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java index 56b08ec..15d3361 100644 --- a/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java +++ b/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java @@ -49,10 +49,10 @@ public class ListCommand extends TokenizedCommand { Set signNames = PaidSigns.getInstance().getSignManager().getAllPaidSigns().keySet(); List signNameList = new ArrayList<>(signNames); Collections.sort(signNameList); - + String infoFormat = Translator.getTranslatedMessage(TranslatableMessage.PAID_SIGNS_INFO_FORMAT); + for (String signName : signNameList) { - signs.append(StringFormatter.replacePlaceholder(Translator.getTranslatedMessage( - TranslatableMessage.PAID_SIGNS_INFO_FORMAT), "{name}", signName)); + signs.append(StringFormatter.replacePlaceholder(infoFormat, "{name}", signName)); } sender.sendMessage(StringFormatter.replacePlaceholder(Translator.getTranslatedMessage( TranslatableMessage.PAID_SIGNS_INFO), "{signs}", signs.toString())); diff --git a/src/main/resources/strings.yml b/src/main/resources/strings.yml index b12373d..a357f01 100644 --- a/src/main/resources/strings.yml +++ b/src/main/resources/strings.yml @@ -10,10 +10,11 @@ en: SUCCESS_PAID_FOR_SIGN: "&bYou paid &3{cost} {unit} &bto create the sign" SUCCESS_REFUNDED: "&bYou were refunded &3{cost} {unit} &bfor your broken sign" PAID_SIGNS_INFO: | - &f---&3Paid signs&f---{signs} + &f---&3Paid signs&f--- + {signs} &f----------- PAID_SIGNS_INFO_FORMAT: | - &f| &3{name} + &f| &b{name} PAID_SIGN_INFO: | &f---&3Paid sign&f--- &f| &bName: &3{name}