mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 22:21:52 +00:00
- Fix missing space following {title} and {townyprefix} (when it is
calling for a resident's title.)
This commit is contained in:
1 parent
b82f349d54
commit
02573e6bde
2 files changed
+3
-2
No files matched your search
@@ -245,3 +245,4 @@ v0.57:
|
|||||||
- New ChatConfig option: chat_colour.nomad
|
- New ChatConfig option: chat_colour.nomad
|
||||||
- Default: &f
|
- Default: &f
|
||||||
- You can now set the {townycolour} for players without a town.
|
- 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.)
|
||||||
@@ -94,7 +94,7 @@ public class TownyChatFormatter {
|
|||||||
replacer.registerFormatReplacement(Pattern.quote("{title}"), new TownyChatReplacerCallable() {
|
replacer.registerFormatReplacement(Pattern.quote("{title}"), new TownyChatReplacerCallable() {
|
||||||
@Override
|
@Override
|
||||||
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
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() {
|
replacer.registerFormatReplacement(Pattern.quote("{surname}"), new TownyChatReplacerCallable() {
|
||||||
@@ -118,7 +118,7 @@ public class TownyChatFormatter {
|
|||||||
replacer.registerFormatReplacement(Pattern.quote("{townyprefix}"), new TownyChatReplacerCallable() {
|
replacer.registerFormatReplacement(Pattern.quote("{townyprefix}"), new TownyChatReplacerCallable() {
|
||||||
@Override
|
@Override
|
||||||
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
||||||
return event.getResident().hasTitle() ? event.getResident().getTitle() : TownyFormatter.getNamePrefix(event.getResident());
|
return event.getResident().hasTitle() ? event.getResident().getTitle() + " " : TownyFormatter.getNamePrefix(event.getResident());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
replacer.registerFormatReplacement(Pattern.quote("{townypostfix}"), new TownyChatReplacerCallable() {
|
replacer.registerFormatReplacement(Pattern.quote("{townypostfix}"), new TownyChatReplacerCallable() {
|
||||||
|
|||||||
Reference in new issue
Block a user