Clears author, generation and title data just in case

This commit is contained in:
Kristian Knarvik 2022-11-04 16:19:15 +01:00
parent 90bab4a148
commit c27756f7dc
2 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,7 @@ Books without Borders has got your back!
- Add lore to any item with a simple command - Add lore to any item with a simple command
- Supports adding and saving color to title, lore, and book contents - Supports adding and saving color to title, lore, and book contents
- Color and formatting codes can be manually turned into formatting using /formatbook - Color and formatting codes can be manually turned into formatting using /formatbook
- Clear a book, and start anew with /clearbook
- Formatting and color codes can be turned into formatting once any book is signed. This is enabled through a config - Formatting and color codes can be turned into formatting once any book is signed. This is enabled through a config
value value
- Change generation of books. Create tattered books for your RPG server! - Change generation of books. Create tattered books for your RPG server!

View File

@ -40,6 +40,9 @@ public class CommandClear implements TabExecutor {
return false; return false;
} }
bookMeta.setPages(""); bookMeta.setPages("");
bookMeta.setAuthor(null);
bookMeta.setGeneration(null);
bookMeta.setTitle(null);
heldBook.setItemMeta(bookMeta); heldBook.setItemMeta(bookMeta);
BooksWithoutBorders.sendSuccessMessage(sender, "Book cleared!"); BooksWithoutBorders.sendSuccessMessage(sender, "Book cleared!");
return true; return true;