mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-02 17:09:58 +01:00
trim and replace spaces in chapter names to always work in commands
This commit is contained in:
parent
1ac5b4230e
commit
b3cae17cab
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user