Allow players to add newlines (\n) via command, not just manually in yml.

This commit is contained in:
wizjany 2013-07-25 10:27:38 -04:00
parent 326d53fd09
commit 2510c3eeb5

View File

@ -213,18 +213,14 @@ public static boolean checkMove(WorldGuardPlugin plugin, Player player, Location
|| !state.lastFarewell.equals(farewell))) {
String replacedFarewell = plugin.replaceMacros(
player, BukkitUtil.replaceColorMacros(state.lastFarewell));
for (String line : replacedFarewell.split("\n")) {
player.sendMessage(line);
}
player.sendMessage(replacedFarewell.replaceAll("\\\\n", "\n").split("\\n"));
}
if (greeting != null && (state.lastGreeting == null
|| !state.lastGreeting.equals(greeting))) {
String replacedGreeting = plugin.replaceMacros(
player, BukkitUtil.replaceColorMacros(greeting));
for (String line : replacedGreeting.split("\n")) {
player.sendMessage(line);
}
player.sendMessage(replacedGreeting.replaceAll("\\\\n", "\n").split("\\n"));
}
if ((notifyLeave == null || !notifyLeave)