Fixes a message not displaying correctly
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good

This commit is contained in:
2025-08-27 13:11:01 +02:00
parent a96ce4f7a7
commit e710cb913d
3 changed files with 3 additions and 2 deletions

View File

@@ -125,7 +125,7 @@
<dependency>
<groupId>net.knarcraft</groupId>
<artifactId>knarlib</artifactId>
<version>1.2.8</version>
<version>1.2.9</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@@ -86,7 +86,7 @@ public class AuthorBookIndex extends BookIndex {
for (int bookIndex = startIndex; bookIndex < Math.min(startIndex + booksPerPage, availableBooks.size()); bookIndex++) {
String title = BookFileHelper.getBookTitleFromPath(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(
new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + command + " " +

View File

@@ -323,6 +323,7 @@ public final class BookFileHelper {
fileName = InputCleaningHelper.cleanString(fileName);
List<String> possiblePaths = List.of(
fileName,
fileName.replace(" ", "_"),
fileName + ".yml",
fileName.replace(" ", "_") + ".yml",
fileName + ".txt",