Fixes some issues
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
Fixes the API version being read incorrectly by Paper Fixes the check for missing title or author for a book in a bookshelf
This commit is contained in:
parent
f9908db88f
commit
1158820f97
@ -83,12 +83,12 @@ public class BookshelfListener implements Listener {
|
|||||||
private String getBookDescription(BookMeta bookMeta) {
|
private String getBookDescription(BookMeta bookMeta) {
|
||||||
String title;
|
String title;
|
||||||
String author;
|
String author;
|
||||||
if (!bookMeta.hasTitle()) {
|
if (!bookMeta.hasTitle() || bookMeta.getTitle() == null) {
|
||||||
title = "Untitled";
|
title = "Untitled";
|
||||||
} else {
|
} else {
|
||||||
title = bookMeta.getTitle();
|
title = bookMeta.getTitle();
|
||||||
}
|
}
|
||||||
if (!bookMeta.hasAuthor()) {
|
if (!bookMeta.hasAuthor() || bookMeta.getAuthor() == null) {
|
||||||
author = "Unknown";
|
author = "Unknown";
|
||||||
} else {
|
} else {
|
||||||
author = bookMeta.getAuthor();
|
author = bookMeta.getAuthor();
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
name: BooksWithoutBorders
|
name: BooksWithoutBorders
|
||||||
version: '${project.version}'
|
version: '${project.version}'
|
||||||
main: net.knarcraft.bookswithoutborders.BooksWithoutBorders
|
main: net.knarcraft.bookswithoutborders.BooksWithoutBorders
|
||||||
api-version: 1.20
|
api-version: '1.20'
|
||||||
prefix: Books Without Borders
|
prefix: 'Books Without Borders'
|
||||||
authors: [ EpicKnarvik97, AkiraAkiba ]
|
authors: [ EpicKnarvik97, AkiraAkiba ]
|
||||||
description: A continuation of the original Books Without Borders
|
description: 'A continuation of the original Books Without Borders'
|
||||||
softdepend: [ Vault ]
|
softdepend: [ Vault ]
|
||||||
website: https://www.spigotmc.org/resources/books-without-borders-updated.96069/
|
website: https://www.spigotmc.org/resources/books-without-borders-updated.96069/
|
||||||
dev-url: https://git.knarcraft.net/EpicKnarvik97/Books-Without-Borders
|
dev-url: https://git.knarcraft.net/EpicKnarvik97/Books-Without-Borders
|
||||||
|
Loading…
Reference in New Issue
Block a user