mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-12 03:57:03 +00:00
Handle when a string has an actual newline in it
This commit is contained in:
parent
801c3c7239
commit
d1c0e9eff8
1 changed files with 4 additions and 0 deletions
|
@ -1761,6 +1761,10 @@ public class DisguiseUtilities {
|
|||
}
|
||||
|
||||
public static String[] splitNewLine(String string) {
|
||||
if (string.contains("\n")) {
|
||||
return string.split("\n");
|
||||
}
|
||||
|
||||
Pattern regex = Pattern.compile("\\\\+n");
|
||||
Matcher result = regex.matcher(string);
|
||||
|
||||
|
|
Loading…
Reference in a new issue