Adds a command for editing all options, and removes /setBookPrice #17
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good

This commit is contained in:
2025-09-07 20:35:04 +02:00
parent e9e4836a16
commit c1f88581f1
19 changed files with 612 additions and 276 deletions

View File

@@ -62,35 +62,35 @@ Books without Borders has got your back!
An in-game description of available commands is available through the /bwb command.
| Command | Alias | Arguments | Permission | Description |
|----------------------|---------------|----------------------------------------------------------------------------------|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| /addbooktitlepage | bwbTitlePage | \[page index] \[title~description] | bookswithoutborders.addtitlepage | Adds a blank page, title page or chapter page depending on input and whether the book is signed. The title author separator (default `~`) is used to separate the input into title,paragraph1,paragraph2,... |
| /bookswithoutborders | bwb | None | | Displays information about commands (and permissions if the user has bookswithoutborders.admin) |
| /clearbook | bwbClear | None | bookswithoutborders.clear | Removes all text from the held un-signed book |
| /copybook | bwbCopy | \<# of copies> | bookswithoutborders.copy | Copies the book the player is holding |
| /createbwbsign | bwbSign | \<give/encrypt/decrypt> \[book identifier/password] \[encryption style] | bookswithoutborders.signs | Creates a books without borders sign, as specified. This command is not restricted by the normal sign line text limit, and can load books with any name length for give signs. Encrypt and decrypts signs can be created manually just fine, but using this avoids manual formatting. |
| /decryptbook | bwbDecrypt | \<key> | bookswithoutborders.decrypt | Decrypts the book the player is holding. "key" is required and MUST be IDENTICAL to the key used to encrypt the held book |
| /deletebook | bwbDelete | \<file name or number> | bookswithoutborders.delete | Deletes the specified file in the player's directory |
| /deletebookpage | bwbDeletePage | \<page> | bookswithoutborders.deletepage | Deletes one page from a book |
| /deletepublicbook | bwbDeleteP | \<file name or number> | bookswithoutborders.admin | Same as deletebook, but deletes files in the public directory |
| /encryptbook | bwbEncrypt | \<key> \[encryption style] | bookswithoutborders.encrypt | Encrypts the book the player is holding. "key" is required and can be any phrase or number excluding spaces. "style" is not required. Possible values are "dna", "substitution", "aes", "onetimepad" and "magic", unless real encryption is enabled, which limits available algorithms. |
| /formatbook | bwbFormat | None | bookswithoutborders.format | Formats the held written book (converts color and formatting codes to the corresponding formatted text) |
| /givebook | bwbGive | \<file name or number> \<playername> \[# of copies (num)] \[signed (true/false)] | bookswithoutborders.give | Gives the selected player a book from your personal directory |
| /givepublicbook | bwbGiveP | \<file name or number> \<playername> \[# of copies (num)] \[signed (true/false)] | bookswithoutborders.givepublic | Same as givebook, but uses books from the public directory |
| /groupencryptbook | bwbGEncrypt | \<group name> \<key> \[encryption style] | bookswithoutborders.groupencrypt | Makes an encrypted book that only players with the "bookswithoutborders.decrypt.<group>" permission can decrypt. It's always auto-decrypted, so the key only matters for scrambling the contents. |
| /loadbook | bwbLoad | \<file name or number> \[# of copies] \[signed (true/false)] | bookswithoutborders.load | Creates a book from the specified file and gives it to the player. If no file is specified, a list of available files is returned. If true is specified, the book will be signed, if false it will be unsigned |
| /loadpublicbook | bwbLoadP | \<file name or number> \[# of copies] \[signed (true/false)] | bookswithoutborders.loadpublic | Same as loadbook, but views files in the public directory |
| /migratebooks | bwbMigrate | None | bookswithoutborders.admin | Migrates all txt books to yml, and fixes any incorrect filenames. |
| /reload | bwbReload | None | bookswithoutborders.reload | Reloads BwB's configuration file |
| /savebook | bwbSave | \[overwrite (true/false)] | bookswithoutborders.save | Saves the book the player is holding to a text file in a private directory. If true is specified, a book of the same name by the same author will be overwritten by the new book |
| /savepublicbook | bwbSaveP | \[overwrite (true/false)] | bookswithoutborders.savepublic | Same as savebook, but saves files in the public directory |
| /setbookauthor | bwbAuthor | \<author> | bookswithoutborders.setauthor | Sets the author of the book the player is holding |
| /setbookgeneration | bwbGeneration | \<generation> | bookswithoutborders.setgeneration | Sets the generation of the held book (ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, TATTERED) |
| /setbookprice | bwbPrice | \<item/eco> \<quantity> | bookswithoutborders.setbookprice | Sets the per-book price to create a book via commands. If "Item", the item in the player's hand in the amount of \<quantity> will be the price. If "Eco", a Vault based economy will be used for price. If neither \<Item/Eco> nor \<quantity> are specified, the current price to create books will be removed. |
| /setbookshelfdata | bwbShelfData | \<delete/name/lore> \text> \[more text] | bookswithoutborders.editbookshelf | Sets the name/lore for a bookshelf which is shown when peeking at its contents. |
| /setlore | bwbLore | \<new lore> | bookswithoutborders.setlore | Sets the lore of the item the player is holding. Insert the lore_line_separator character to force a new line ("~" by default) |
| /settitle | bwbTitle | \<title> \[title] ... \[setDisplayName (true/false)] | bookswithoutborders.settitle | Sets the title of the book or the display name of the item the player is holding. Add a true at the end (`/settitle some title true`) to set a book's display name instead of its title. |
| /unsignbook | bwbUnsign | None | bookswithoutborders.unsign | Un-signs the book the player is holding |
| Command | Alias | Arguments | Permission | Description |
|----------------------|---------------|----------------------------------------------------------------------------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| /addbooktitlepage | bwbTitlePage | \[page index] \[title~description] | bookswithoutborders.addtitlepage | Adds a blank page, title page or chapter page depending on input and whether the book is signed. The title author separator (default `~`) is used to separate the input into title,paragraph1,paragraph2,... |
| /bookswithoutborders | bwb | None | | Displays information about commands (and permissions if the user has bookswithoutborders.admin) |
| /clearbook | bwbClear | None | bookswithoutborders.clear | Removes all text from the held un-signed book |
| /copybook | bwbCopy | \<# of copies> | bookswithoutborders.copy | Copies the book the player is holding |
| /createbwbsign | bwbSign | \<give/encrypt/decrypt> \[book identifier/password] \[encryption style] | bookswithoutborders.signs | Creates a books without borders sign, as specified. This command is not restricted by the normal sign line text limit, and can load books with any name length for give signs. Encrypt and decrypts signs can be created manually just fine, but using this avoids manual formatting. |
| /decryptbook | bwbDecrypt | \<key> | bookswithoutborders.decrypt | Decrypts the book the player is holding. "key" is required and MUST be IDENTICAL to the key used to encrypt the held book |
| /deletebook | bwbDelete | \<file name or number> | bookswithoutborders.delete | Deletes the specified file in the player's directory |
| /deletebookpage | bwbDeletePage | \<page> | bookswithoutborders.deletepage | Deletes one page from a book |
| /deletepublicbook | bwbDeleteP | \<file name or number> | bookswithoutborders.admin | Same as deletebook, but deletes files in the public directory |
| /editbwbconfig | bwbConfig | \<option> \[value] \[value] ... | bookswithoutborders.admin | Edits a configuration option in the config file. Correct usage heavily depends on the specific value you want to change. |
| /encryptbook | bwbEncrypt | \<key> \[encryption style] | bookswithoutborders.encrypt | Encrypts the book the player is holding. "key" is required and can be any phrase or number excluding spaces. "style" is not required. Possible values are "dna", "substitution", "aes", "onetimepad" and "magic", unless real encryption is enabled, which limits available algorithms. |
| /formatbook | bwbFormat | None | bookswithoutborders.format | Formats the held written book (converts color and formatting codes to the corresponding formatted text) |
| /givebook | bwbGive | \<file name or number> \<playername> \[# of copies (num)] \[signed (true/false)] | bookswithoutborders.give | Gives the selected player a book from your personal directory |
| /givepublicbook | bwbGiveP | \<file name or number> \<playername> \[# of copies (num)] \[signed (true/false)] | bookswithoutborders.givepublic | Same as givebook, but uses books from the public directory |
| /groupencryptbook | bwbGEncrypt | \<group name> \<key> \[encryption style] | bookswithoutborders.groupencrypt | Makes an encrypted book that only players with the "bookswithoutborders.decrypt.<group>" permission can decrypt. It's always auto-decrypted, so the key only matters for scrambling the contents. |
| /loadbook | bwbLoad | \<file name or number> \[# of copies] \[signed (true/false)] | bookswithoutborders.load | Creates a book from the specified file and gives it to the player. If no file is specified, a list of available files is returned. If true is specified, the book will be signed, if false it will be unsigned |
| /loadpublicbook | bwbLoadP | \<file name or number> \[# of copies] \[signed (true/false)] | bookswithoutborders.loadpublic | Same as loadbook, but views files in the public directory |
| /migratebooks | bwbMigrate | None | bookswithoutborders.admin | Migrates all txt books to yml, and fixes any incorrect filenames. |
| /reload | bwbReload | None | bookswithoutborders.reload | Reloads BwB's configuration file |
| /savebook | bwbSave | \[overwrite (true/false)] | bookswithoutborders.save | Saves the book the player is holding to a text file in a private directory. If true is specified, a book of the same name by the same author will be overwritten by the new book |
| /savepublicbook | bwbSaveP | \[overwrite (true/false)] | bookswithoutborders.savepublic | Same as savebook, but saves files in the public directory |
| /setbookauthor | bwbAuthor | \<author> | bookswithoutborders.setauthor | Sets the author of the book the player is holding |
| /setbookgeneration | bwbGeneration | \<generation> | bookswithoutborders.setgeneration | Sets the generation of the held book (ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, TATTERED) |
| /setbookshelfdata | bwbShelfData | \<delete/name/lore> \text> \[more text] | bookswithoutborders.editbookshelf | Sets the name/lore for a bookshelf which is shown when peeking at its contents. |
| /setlore | bwbLore | \<new lore> | bookswithoutborders.setlore | Sets the lore of the item the player is holding. Insert the lore_line_separator character to force a new line ("~" by default) |
| /settitle | bwbTitle | \<title> \[title] ... \[setDisplayName (true/false)] | bookswithoutborders.settitle | Sets the title of the book or the display name of the item the player is holding. Add a true at the end (`/settitle some title true`) to set a book's display name instead of its title. |
| /unsignbook | bwbUnsign | None | bookswithoutborders.unsign | Un-signs the book the player is holding |
### Permissions:
@@ -131,7 +131,6 @@ An in-game description of available commands is available through the /bwb comma
| bookswithoutborders.save | Allows a player to save books to their personal directory |
| bookswithoutborders.savepublic | Allows player to save to the public directory |
| bookswithoutborders.setauthor | Allows player to set the author of the currently held book |
| bookswithoutborders.setbookprice | Allows player to set the cost of creating a book |
| bookswithoutborders.setgeneration | Allows player to change the generation of a book (Original, Copy, Copy of Copy) |
| bookswithoutborders.settitle | Allows player to set the title of the currently held book |
| bookswithoutborders.signs | Allows player to create signs that give/encrypt/decrypt books |