From 6da67f1ea6282560426a9a5282c6244858cb250a Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sat, 12 Mar 2011 17:01:56 +0100 Subject: Compensate for sendMessage losing its 'unintended splitting on existing newlines'-feature --- src/main/java/org/bukkit/command/PluginCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/bukkit/command/PluginCommand.java b/src/main/java/org/bukkit/command/PluginCommand.java index 97c6ad66..bacf41cd 100644 --- a/src/main/java/org/bukkit/command/PluginCommand.java +++ b/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; -- cgit v1.2.3