Correctly convert \n to a newline for String flags

This commit is contained in:
zml2008 2012-04-16 17:00:41 -07:00
parent 166831447c
commit 4f14f1f736

View File

@ -39,7 +39,7 @@ public StringFlag(String name) {
@Override
public String parseInput(WorldGuardPlugin plugin, CommandSender sender,
String input) throws InvalidFlagFormat {
return input;
return input.replaceAll("(?!\\\\)\\\\n", "\n").replaceAll("\\\\\\\\n", "\\n");
}
@Override