diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/util/ChatPaginator.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/util/ChatPaginator.java b/src/main/java/org/bukkit/util/ChatPaginator.java index 87c8aec6..b0b91ad8 100644 --- a/src/main/java/org/bukkit/util/ChatPaginator.java +++ b/src/main/java/org/bukkit/util/ChatPaginator.java @@ -93,7 +93,10 @@ public class ChatPaginator { for (String partialWord : word.toString().split("(?<=\\G.{" + lineLength + "})")) { lines.add(partialWord); } - } else if (line.length() + word.length() - lineColorChars == lineLength) { // Line exactly the correct length...newline + } else if (line.length() + 1 + word.length() - lineColorChars == lineLength) { // Line exactly the correct length...newline + if (line.length() > 0) { + line.append(' '); + } line.append(word); lines.add(line.toString()); line = new StringBuilder(); |