Adds missing spacing when replacing underscores in book names
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good

This commit is contained in:
2025-08-02 08:02:09 +02:00
parent a84a56391a
commit 9e300afbef

View File

@@ -228,7 +228,7 @@ public final class BookFileHelper {
@NotNull @NotNull
private static String getNiceName(@NotNull String bookPath) { private static String getNiceName(@NotNull String bookPath) {
bookPath = ChatColor.translateAlternateColorCodes('&', bookPath.substring(0, bookPath.length() - 4)) bookPath = ChatColor.translateAlternateColorCodes('&', bookPath.substring(0, bookPath.length() - 4))
.replace("_", ""); .replace("_", " ");
String[] parts = bookPath.split(","); String[] parts = bookPath.split(",");
return parts[0] + ChatColor.RESET + " by " + parts[1] + ChatColor.RESET; return parts[0] + ChatColor.RESET + " by " + parts[1] + ChatColor.RESET;
} }