1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 19:14:18 +02:00

trim and replace spaces in chapter names to always work in commands

This commit is contained in:
Necrodoom
2013-08-13 20:04:02 +03:00
committed by KHobbits
parent 97934669ec
commit b938f01b18

View File

@@ -76,7 +76,7 @@ public class TextInput implements IText
if (line.length() > 0 && line.charAt(0) == '#')
{
bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-fk]", ""), lineNumber);
chapters.add(line.substring(1).replace('&', '§').replace("§§", "&"));
chapters.add(line.substring(1).replace('&', '§').replace("§§", "&").trim().replace(" ", "_"));
}
lines.add(line.replace('&', '§').replace("§§", "&"));
lineNumber++;