mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI.git
synced 2024-11-29 14:06:33 +01:00
account for empty strings
This commit is contained in:
parent
b73d00e169
commit
2d72e274e3
@ -168,6 +168,9 @@ public final class CharsReplacer implements Replacer {
|
||||
builder.append(ChatColor.translateAlternateColorCodes('&', replacement));
|
||||
}
|
||||
|
||||
if (builder.length() == 0) {
|
||||
return "";
|
||||
}
|
||||
char c = builder.charAt(builder.length() - 1);
|
||||
if (c == ' ') {
|
||||
return builder.substring(0, builder.length() - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user