mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 03:24:31 +02:00
trim and replace spaces in chapter names to always work in commands
This commit is contained in:
@@ -76,7 +76,7 @@ public class TextInput implements IText
|
|||||||
if (line.length() > 0 && line.charAt(0) == '#')
|
if (line.length() > 0 && line.charAt(0) == '#')
|
||||||
{
|
{
|
||||||
bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-fk]", ""), lineNumber);
|
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("§§", "&"));
|
lines.add(line.replace('&', '§').replace("§§", "&"));
|
||||||
lineNumber++;
|
lineNumber++;
|
||||||
|
Reference in New Issue
Block a user