Cleans the config file, and properly migrates existing configurations #16
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good

This commit is contained in:
2025-09-05 22:39:32 +02:00
parent d7995c7bc4
commit 1437739fe3
7 changed files with 188 additions and 79 deletions

View File

@@ -164,24 +164,25 @@ The **_decrypt_** sign must have **\[Decrypt]** on its second line. The third li
### Configuration options:
| Option | Description |
|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Max_Number_of_Duplicates | The maximum number of duplicates of a saved book allowed |
| Author_Separator | The separator used to separate the book title and the book author |
| Lore_line_separator | The separator used to denote a new line in the book/item lore |
| Books_for_new_players | A list of books given to new players the first time they join the server |
| Message_for_new_players | An optional message displayed to new players the first time they join the server |
| Price_to_create_book.Item_type | The item type used as currency for copying books. Use "Economy" to use money instead of items |
| Price_to_create_book.Required_quantity | The quantity of currency required to pay for each book produced |
| Admin_Auto_Decrypt | Whether any admin can decrypt any book regardless of the group it was encrypted for |
| Author_Only_Copy | Whether to only allow the author of a book to create copies |
| Author_Only_Unsign | Whether to only allow the author of a book to unsign it |
| Author_Only_Save | Whether to only allow saving a player's own books with /savebook |
| Format_Book_After_Signing | Whether to automatically format every book when it's signed |
| Change_Generation_On_Copy | Whether to display "COPY" or "COPY_OF_COPY" instead of "ORIGINAL" when a book is copied. This also uses the vanilla behavior where a copy of a copy or tattered book cannot be copied further. |
| Enable_Book_Peeking | Whether to enable hitting a chiseled bookshelf while sneaking to see the shelf's contents. |
| Use_Real_Encryption | Enables true AES encryption instead of the very fake legacy encryption. The encryption key is stored in the book file to allow admin decryption, but looking at the encrypted book in the file system, only reveals the encrypted pages. Note that real encryption might alter, corrupt or lose a book's contents, so don't use real encryption with books that have no backup in in-game book form or saved book form. |
| Allow_Prevent_Admin_Decryption | Allows players to disable storing the encryption key for an encrypted book. This is only usable for real encryption. This effectively disable admin decryption for the book. Providing the correct password is the only way to decrypt a book without a stored key. THIS IS A DANGEROUS OPTION! |
| Option | Description |
|------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| language | The language to use. Only "en" is built-in, but custom languages can be added. | |
| limit.maxDuplicates | The maximum number of duplicates of an unsigned saved book allowed. |
| separator.titleAuthor | The separator used to separate the book title and the book author. It is recommended to change this to some rarely used character such as `¤`, and migrating existing books with `/migrateBooks`. |
| separator.loreLine | The separator used to denote a new line in the book/item lore. It is also used for `/addbooktitlepage` for differentiating between the header and description. |
| firstJoin.booksToGive | A list of books given to new players the first time they join the server. Use the full file name with extension. The book must be in the public directory. |
| firstJoin.welcomeMessage | An optional message displayed to new players the first time they join the server. |
| bookPrice.itemType | The item type used as currency for copying books. Use "Economy" to use money instead of items. |
| bookPrice.quantity | The quantity of currency required to pay for each book produced. You can use decimals if you use economy, but decimals will be ignored for item cost. |
| authorRestricted.copy | Whether to only allow the author of a book to create copies |
| authorRestricted.unsign | Whether to only allow the author of a book to unsign it |
| authorRestricted.save | Whether to only allow saving a player's own books with `/savebook` |
| functionality.formatBookOnSigning | Whether to automatically format every book when it's signed, if the player has the necessary permission. |
| functionality.changeBookGenerationOnCopy | Whether to set the generation to "COPY" or "COPY_OF_COPY" instead of "ORIGINAL" when a book is copied. This also uses the vanilla behavior where a copy of a copy or tattered book cannot be copied further. |
| functionality.enableBookPeeking | Whether to enable hitting a chiseled bookshelf while sneaking to see the shelf's contents. |
| encryption.allowAdminBypass | Whether any admin can decrypt any book regardless of the group it was encrypted for, and decrypt normally encrypted books without having to supply a password. |
| encryption.useRealEncryption | Enables true AES encryption instead of the very fake legacy encryption. The encryption key is stored in the book file to allow admin decryption, but looking at the encrypted book in the file system, only reveals the encrypted pages. Note that real encryption might alter, corrupt or lose a book's contents, so don't use real encryption with books that have no backup in in-game book form or saved book form. |
| encryption.allowAdminBypassBlocking | Allows players to disable storing the encryption key for an encrypted book. This is only usable for real encryption. This effectively disable admin decryption for the book. Providing the correct password is the only way to decrypt a book without a stored key. THIS IS A DANGEROUS OPTION! |
## Language customization