mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-10-01 16:17:28 +02:00
Allow players to add newlines (\n) via command, not just manually in yml.
This commit is contained in:
parent
326d53fd09
commit
2510c3eeb5
@ -213,18 +213,14 @@ public static boolean checkMove(WorldGuardPlugin plugin, Player player, Location
|
|||||||
|| !state.lastFarewell.equals(farewell))) {
|
|| !state.lastFarewell.equals(farewell))) {
|
||||||
String replacedFarewell = plugin.replaceMacros(
|
String replacedFarewell = plugin.replaceMacros(
|
||||||
player, BukkitUtil.replaceColorMacros(state.lastFarewell));
|
player, BukkitUtil.replaceColorMacros(state.lastFarewell));
|
||||||
for (String line : replacedFarewell.split("\n")) {
|
player.sendMessage(replacedFarewell.replaceAll("\\\\n", "\n").split("\\n"));
|
||||||
player.sendMessage(line);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (greeting != null && (state.lastGreeting == null
|
if (greeting != null && (state.lastGreeting == null
|
||||||
|| !state.lastGreeting.equals(greeting))) {
|
|| !state.lastGreeting.equals(greeting))) {
|
||||||
String replacedGreeting = plugin.replaceMacros(
|
String replacedGreeting = plugin.replaceMacros(
|
||||||
player, BukkitUtil.replaceColorMacros(greeting));
|
player, BukkitUtil.replaceColorMacros(greeting));
|
||||||
for (String line : replacedGreeting.split("\n")) {
|
player.sendMessage(replacedGreeting.replaceAll("\\\\n", "\n").split("\\n"));
|
||||||
player.sendMessage(line);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((notifyLeave == null || !notifyLeave)
|
if ((notifyLeave == null || !notifyLeave)
|
||||||
|
Loading…
Reference in New Issue
Block a user