From 475e26dc815957adf3632e382720194c33ea7bad Mon Sep 17 00:00:00 2001 From: Llm Dl Date: Mon, 14 Oct 2019 07:56:00 -0500 Subject: [PATCH] - Fix missing space following the title in {townyprefix} (when there is no mayor/king prefix present.) --- resources/changelog.txt | 2 +- src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/changelog.txt b/resources/changelog.txt index 7467564..db955e1 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -245,4 +245,4 @@ v0.57: - New ChatConfig option: chat_colour.nomad - Default: &f - You can now set the {townycolour} for players without a town. - - Fix missing space following {title} and {townyprefix} (when it is calling for a resident's title.) \ No newline at end of file + - Fix missing space following the title in {townyprefix} (when there is no mayor/king prefix present.) \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java b/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java index 5f7c276..00622aa 100644 --- a/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java +++ b/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java @@ -94,7 +94,7 @@ public class TownyChatFormatter { replacer.registerFormatReplacement(Pattern.quote("{title}"), new TownyChatReplacerCallable() { @Override public String call(String match, LocalTownyChatEvent event) throws Exception { - return event.getResident().hasTitle() ? event.getResident().getTitle() + " " : ""; + return event.getResident().hasTitle() ? event.getResident().getTitle() : ""; } }); replacer.registerFormatReplacement(Pattern.quote("{surname}"), new TownyChatReplacerCallable() {