Warning: Back up your plugins\BooksWithoutBorders folder before updating. Otherwise, you cannot downgrade, and any unknown bugs might cause permanent damage to your saved books.
This is a pre-release, as it has a lot of changes, and hasn't really been tested as a whole, even though each individual change was tested separately at some point. Please report any encountered bugs in the discord server, or create a new issue.
Also note that this is your chance to change the title-author separator without having to manually rename the files. Just change it to a rarely used character, like '¤', run the /migrateBooks command and the migration process will rename all files for you.
While commands are described when running the /bwb <commandName> command, and the configuration file now has much better comments, you can also refer to
the dev branch's readme for this release.
This update took way too long, but I kept finding things I wanted to improve that took ages to find a a satisfying optimal solution for. In addition, I didn't really want to release it untested, but the ones planning to test the plugin last year were never able to.
After 99 commits, 9626 additions and 4092 deletions, and almost a year has passed since the last update, it's hard to really keep track of all the changes, but I think the following overview covers most of them:
New commands:
- /addbooktitlepage - Used to add a blank page, chapter page or front page to a book.
- /createbwbsign - Used to create one of the available special signs supported by Books without Borders. This uses some trickery to use the full book path on the sign, preventing problems encountered when using a book id.
- /deletebookpage - Used to delete a specific page from a book.
- /editbwbconfig - Used to edit configuration values without having to edit config.yml directly.
- /migratebooks - Used to migrate books to the new structure that allows spaces in filenames. Also useful to change the title-author separator.
- /searchbooks - A useful command when looking for a specific book while only knowing the author or a specific property of the title.
- /searchpublicbooks - Same as /searchbooks for publicly saved books.
Removed commands:
- /setbookprice - Removed in favor of the new /editbwbconfig command.
Changed commands:
- setLore and setTitle can be used with no arguments to remove lore or display name.
- setTitle has a new toggle for setting display a name for a signed book.
- bwb now shows a shorter summary of each command, but takes command name as argument for more detailed info.
- All commands now have an alias starting with bwb, which is useful to see all available commands.
New configuration options:
- authorRestricted.encrypt - Whether to limit book encryption to a book's owner
- functionality.saveOnlyOriginal - Whether to only allow saving a book if it's the original copy of that book.
- encryption.allowAdminBypass - Whether to allow admins to be able to decrypt books without having the right group permission or without having the decryption password.
- encryption.useRealEncryption - Whether to use real AES encryption instead of the old method of scrambling the book while storing the unscrambled book contents to a file.
- encryption.allowAdminBypassBlocking - Whether to allow players to mark a book as non-admin-decryptable. Can be used toghether with useRealEncryption (or by manually selecting AES encryption) to make encrypted books unrecoverable without the correct password.
Removed configuration options:
- Save_Books_in_Yaml_Format - All books are now saved as yml files. Txt files can still be loaded.
New permissions:
- bookswithoutborders.addtitlepage - Allows usage of the /addbooktitlepage command
- bookswithoutborders.deletepage - Allows usage of the /deletebookpage command
- bookswithoutborders.preventadmindecryption - Allows player to toggle the prevention of admin decryption if the option encryption.allowAdminBypassBlocking is enabled.
- bookswithoutborders.searchbooks - Allows player to search through their saved books.
- bookswithoutborders.searchpublicbooks - Allows player to search through the publicly saved collection of books.
Encryption changes:
- Encrypted books now have a new AES encryption choice for the algorithm.
- Adds an option for using real AES encryption instead of the current fake encryption of books. Admin encryption is still possible, as the key is stored in the encrypted book file, but this option may potentially cause a book's contents to be lost.
- Adds an option to allow players to disable admin encryption when encrypting a book. If enabled, and a book is encrypted with admin decryption disabled, the ONLY WAY to get the book's contents back is to provide the correct password. It is likely that the password will be in the server logs, and an encryption sign does contain the password if looked at correctly, but this is nevertheless considered a highly dangerous option. Make sure players understand the consequences before enabling this option, giving them permissions and instructing them on its use. Only admins have the required permission by default.
- Stores encrypted books using a persistent UUID to prevent name collisions for encrypted books.
- Prevents saving of encrypted books.
- Tracks number of known encrypted books to know when it's safe to delete the encrypted version of a book.
- Allows overwriting group encrypted books.
Other changes:
- Color tags in book names are properly sanitized.
- Book names can contain spaces without compromises, which means both "-" and "_" are valid in book names. It is recommended to run /migratebooks to take advantage of this change.
- The configuration file has finally been updated to new camelCase names, with improved comments. The migration is automatic on first run after upgrading.
- The book list (shown when using the load/give commands without any arguments) has been further refined.
- Unsigned books can now be formatted, for better whitespace management, and unsigning a book will now automatically revert formatting codes.
- Display name renamed books will now retain their display name when loading the book.
- An error is now shown if attempting to rename a book, while giving a name that's too long.
- Bookshelf peeking is now enabled by default for new installations.
- Messages displayed in the plugin are now configurable, including most formatting. Obtain a copy of strings.yml from the resources folder in the repository, or by opening the BwB .jar file with 7-zip, and put it in BwB's plugin folder. Editing it should display your changes in-game after reloading.
- Rewrites and/or refactors a lot of code.
- Adds persistent data for storing books' encrypted status, real author and other related data. This means that for books signed after this update, author restrictions will work even if the visible author of the book is changed.
- Disallows loading a book as unsigned unless the player has the unsign permission, and passes the author check if necessary.
- Improves book generation limitations by always changing the generation, even on give/load, when enabled.
Bugfixes:
- Fixes a potential exception when importing a txt file as a book.
- Fixes loading of unsigned books.
- Rewriting a lot of code has apparently fixed a bug where BooksWithoutBorders prevented a signed to be placed on another sign.
- Fixes an exception during loading when no books have been saved.