Fixes a message not displaying correctly
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -125,7 +125,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.knarcraft</groupId>
|
<groupId>net.knarcraft</groupId>
|
||||||
<artifactId>knarlib</artifactId>
|
<artifactId>knarlib</artifactId>
|
||||||
<version>1.2.8</version>
|
<version>1.2.9</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@@ -86,7 +86,7 @@ public class AuthorBookIndex extends BookIndex {
|
|||||||
for (int bookIndex = startIndex; bookIndex < Math.min(startIndex + booksPerPage, availableBooks.size()); bookIndex++) {
|
for (int bookIndex = startIndex; bookIndex < Math.min(startIndex + booksPerPage, availableBooks.size()); bookIndex++) {
|
||||||
String title = BookFileHelper.getBookTitleFromPath(availableBooks.get(bookIndex));
|
String title = BookFileHelper.getBookTitleFromPath(availableBooks.get(bookIndex));
|
||||||
String author = BookFileHelper.getBookAuthorFromPath(availableBooks.get(bookIndex));
|
String author = BookFileHelper.getBookAuthorFromPath(availableBooks.get(bookIndex));
|
||||||
String niceName = new FormatBuilder(title + Formatting.NEUTRAL_BOOK_LIST_AUTHOR_SEPARATOR + author).color().build();
|
String niceName = new FormatBuilder(title).append(Formatting.NEUTRAL_BOOK_LIST_AUTHOR_SEPARATOR).append(author).color().build();
|
||||||
|
|
||||||
componentBuilder.append(niceName).color(ChatColor.WHITE).event(
|
componentBuilder.append(niceName).color(ChatColor.WHITE).event(
|
||||||
new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + command + " " +
|
new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + command + " " +
|
||||||
|
@@ -323,6 +323,7 @@ public final class BookFileHelper {
|
|||||||
fileName = InputCleaningHelper.cleanString(fileName);
|
fileName = InputCleaningHelper.cleanString(fileName);
|
||||||
List<String> possiblePaths = List.of(
|
List<String> possiblePaths = List.of(
|
||||||
fileName,
|
fileName,
|
||||||
|
fileName.replace(" ", "_"),
|
||||||
fileName + ".yml",
|
fileName + ".yml",
|
||||||
fileName.replace(" ", "_") + ".yml",
|
fileName.replace(" ", "_") + ".yml",
|
||||||
fileName + ".txt",
|
fileName + ".txt",
|
||||||
|
Reference in New Issue
Block a user