From b191786a1b5c8641962dc390d810c664f5147338 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 12 Mar 2011 17:01:56 +0100 Subject: [PATCH] Compensate for sendMessage losing its 'unintended splitting on existing newlines'-feature By: Erik Broes --- paper-api/src/main/java/org/bukkit/command/PluginCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/command/PluginCommand.java b/paper-api/src/main/java/org/bukkit/command/PluginCommand.java index 97c6ad6644..bacf41cd2a 100644 --- a/paper-api/src/main/java/org/bukkit/command/PluginCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/PluginCommand.java @@ -38,7 +38,9 @@ public final class PluginCommand extends Command { } if (!success && usageMessage.length() > 0) { - sender.sendMessage(usageMessage.replace("", commandLabel)); + for (String line: usageMessage.replace("", commandLabel).split("\n")) { + sender.sendMessage( line ); + } } return success;