Adds aliases to all commands

This commit is contained in:
2025-08-17 16:07:39 +02:00
parent 4501156087
commit cd9255c97a
2 changed files with 123 additions and 64 deletions

112
README.md
View File

@@ -61,72 +61,80 @@ Books without Borders has got your back!
An in-game description of available commands is available through the /bwb command. An in-game description of available commands is available through the /bwb command.
| Command | Arguments | Permission | Description | | Command | Alias | Arguments | Permission | Description |
|----------------------|----------------------------------------------------------------------------------|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |----------------------|---------------|----------------------------------------------------------------------------------|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| /bookswithoutborders | None | | Displays information about commands (and permissions if the user has bookswithoutborders.admin) | | /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 |
| /copybook | \<# of copies> | bookswithoutborders.copy | Copies the book the player is holding | | /bookswithoutborders | bwb | None | | Displays information about commands (and permissions if the user has bookswithoutborders.admin) |
| /decryptbook | \<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 | | /clearbook | bwbclear | None | bookswithoutborders.clear | Removes all text from the held un-signed book |
| /deletebook | \<file name or number> | bookswithoutborders.delete | Deletes the specified file in the player's directory | | /copybook | bwbcopy | \<# of copies> | bookswithoutborders.copy | Copies the book the player is holding |
| /deletepublicbook | \<file name or number> | bookswithoutborders.admin | Same as deletebook, but deletes files in the public directory | | /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 |
| /encryptbook | \<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" or "" | | /deletebook | bwbdelete | \<file name or number> | bookswithoutborders.delete | Deletes the specified file in the player's directory |
| /formatbook | None | bookswithoutborders.format | Formats the held written book (converts color and formatting codes to the corresponding formatted text) | | /deleteBookPage | bwbdeletepage | \<page> | bookswithoutborders.deletepage | Deletes one page from a book |
| /givebook | \<file name or number> \<playername> \[# of copies (num)] \[signed (true/false)] | bookswithoutborders.give | Gives the selected player a book from your personal directory | | /deletepublicbook | bwbdeletep | \<file name or number> | bookswithoutborders.admin | Same as deletebook, but deletes files in the public directory |
| /givepublicbook | \<file name or number> \<playername> \[# of copies (num)] \[signed (true/false)] | bookswithoutborders.givepublic | Same as givebook, but uses books from 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" or "" |
| /loadbook | \<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 | | /formatbook | bwbformat | None | bookswithoutborders.format | Formats the held written book (converts color and formatting codes to the corresponding formatted text) |
| /loadpublicbook | \<file name or number> \[# of copies] \[signed (true/false)] | bookswithoutborders.loadpublic | Same as loadbook, but views files in the public directory | | /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 |
| /reload | None | bookswithoutborders.reload | Reloads BwB's configuration file | | /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 |
| /savebook | \[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 | | /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. |
| /savepublicbook | \[overwrite (true/false)] | bookswithoutborders.savepublic | Same as savebook, but saves files in the public directory | | /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 |
| /setbookauthor | \<author> | bookswithoutborders.setauthor | Sets the author of the book the player is holding | | /loadpublicbook | bwbloadp | \<file name or number> \[# of copies] \[signed (true/false)] | bookswithoutborders.loadpublic | Same as loadbook, but views files in the public directory |
| /setbookgeneration | \<generation> | bookswithoutborders.setgeneration | Sets the generation of the held book (ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, TATTERED) | | /migrateBooks | bwbmigrate | None | bookswithoutborders.admin | Migrates all txt books to yml, and fixes any incorrect filenames. |
| /setbookprice | \<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. | | /reload | bwbreload | None | bookswithoutborders.reload | Reloads BwB's configuration file |
| /setlore | \<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) | | /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 |
| /settitle | \<title> | bookswithoutborders.settitle | Sets the title of the book/item the player is holding | | /savepublicbook | bwbsavep | \[overwrite (true/false)] | bookswithoutborders.savepublic | Same as savebook, but saves files in the public directory |
| /unsignbook | None | bookswithoutborders.unsign | Un-signs the book the player is holding | | /setbookauthor | bwbauthor | \<author> | bookswithoutborders.setauthor | Sets the author of the book the player is holding |
| /clearbook | None | bookswithoutborders.clear | Removes all text from the held un-signed book | | /setbookgeneration | bwbgeneration | \<generation> | bookswithoutborders.setgeneration | Sets the generation of the held book (ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, TATTERED) |
| /setBookshelfData | \<delete/name/lore> \text> \[more text] | bookswithoutborders.editbookshelf | Sets the name/lore for a bookshelf which is shown when peeking at its contents. | | /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. |
| /addBookTitlePage | \[page index] \[title~description] | bookswithoutborders.addtitlepage | Adds a blank page, title page or chapter page depending on input and whether the book is signed | | /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. |
| /deleteBookPage | \<page> | bookswithoutborders.deletepage | Deletes one page from a book | | /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) |
| /migrateBooks | None | bookswithoutborders.admin | Migrates all txt books to yml, and fixes any incorrect filenames. | | /settitle | bwbtitle | \<title> | bookswithoutborders.settitle | Sets the title of the book/item the player is holding |
| /unsignbook | bwbunsign | None | bookswithoutborders.unsign | Un-signs the book the player is holding |
### Permissions: ### Permissions:
#### Grouped permissions
| Node | Description | | Node | Description |
|--------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| |--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| bookswithoutborders.* | Grants all permissions | | bookswithoutborders.* | Grants all permissions |
| bookswithoutborders.admin | Grants all permissions | | bookswithoutborders.admin | Grants all permissions |
| bookswithoutborders.use | bookswithoutborders.use - Allows player to use commands to save/load/delete in their personal directory, and peeking at bookshelves if enabled | | bookswithoutborders.use | bookswithoutborders.use - Allows player to use commands to save/load/delete in their personal directory, and peeking at bookshelves if enabled |
| bookswithoutborders.alterbooks | Allows player to change books' data such as lore/title/author/generation/formatting and un-signing books, and setting bookshelf data | | bookswithoutborders.alterbooks | Allows player to change books' data such as lore/title/author/generation/formatting and un-signing books, and setting bookshelf data |
| bookswithoutborders.reload | Allows player to reload this plugin |
| bookswithoutborders.format | Allows a player to format a book | #### Single permissions
| bookswithoutborders.save | Allows a player to save books to their personal directory |
| bookswithoutborders.load | Allows player to load books from their personal directory | | Node | Description |
| bookswithoutborders.delete | Allows player to delete books from their personal directory | |--------------------------------------------|---------------------------------------------------------------------------------|
| bookswithoutborders.unsign | Allows player to un-sign books | | bookswithoutborders.addtitlepage | Allows player to add a blank title page to a book |
| bookswithoutborders.copy | Allows player to copy books |
| bookswithoutborders.loadpublic | Allows player to load from the public directory |
| bookswithoutborders.savepublic | Allows player to save to the public directory |
| bookswithoutborders.encrypt | Allows player to encrypt books |
| bookswithoutborders.groupencrypt | Allows player to use group-based encryption |
| bookswithoutborders.decrypt | Allows player to decrypt books |
| bookswithoutborders.decrypt.agroup | Allows player to decrypt books group-encrypted for group "agroup" |
| bookswithoutborders.signs | Allows player to create signs that give/encrypt/decrypt books |
| bookswithoutborders.give | Allows player to give another player one of their privately saved books |
| bookswithoutborders.givepublic | Allows a player to give another player a book from the public directory |
| bookswithoutborders.settitle | Allows player to set the title of the currently held book |
| bookswithoutborders.setauthor | Allows player to set the author of the currently held book |
| bookswithoutborders.setlore | Allows player to set the lore of the currently held item |
| bookswithoutborders.bypassauthoronlycopy | Allows player to ignore Author_Only_Copy config setting | | bookswithoutborders.bypassauthoronlycopy | Allows player to ignore Author_Only_Copy config setting |
| bookswithoutborders.bypassauthoronlyunsign | Allows player to ignore Author_Only_Unsign config setting | | bookswithoutborders.bypassauthoronlyunsign | Allows player to ignore Author_Only_Unsign config setting |
| bookswithoutborders.bypassauthoronlysave | Allows player to ignore Author_Only_Save config setting | | bookswithoutborders.bypassauthoronlysave | Allows player to ignore Author_Only_Save config setting |
| bookswithoutborders.bypassbookprice | Allows player to ignore Price_to_create_book config setting | | bookswithoutborders.bypassbookprice | Allows player to ignore Price_to_create_book config setting |
| bookswithoutborders.clear | Allows player to clear the contents of the held writable book |
| bookswithoutborders.copy | Allows player to copy books |
| bookswithoutborders.decrypt | Allows player to decrypt books |
| bookswithoutborders.decrypt.agroup | Allows player to decrypt books group-encrypted for group "agroup" |
| bookswithoutborders.delete | Allows player to delete books from their personal directory |
| bookswithoutborders.deletepage | Allows player to delete a page from a book |
| bookswithoutborders.editbookshelf | Allows player to set name/lore for bookshelves, used for peeking |
| bookswithoutborders.encrypt | Allows player to encrypt books |
| bookswithoutborders.format | Allows a player to format a book |
| bookswithoutborders.give | Allows player to give another player one of their privately saved books |
| bookswithoutborders.givepublic | Allows a player to give another player a book from the public directory |
| bookswithoutborders.groupencrypt | Allows player to use group-based encryption |
| bookswithoutborders.load | Allows player to load books from their personal directory |
| bookswithoutborders.loadpublic | Allows player to load from the public directory |
| bookswithoutborders.peekbookshelf | Allows player to left-click a bookshelf to see the contents of the shelf |
| bookswithoutborders.reload | Allows player to reload this plugin |
| 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.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.setgeneration | Allows player to change the generation of a book (Original, Copy, Copy of Copy) |
| bookswithoutborders.clear | Allows player to clear the contents of the held writable book | | bookswithoutborders.settitle | Allows player to set the title of the currently held book |
| bookswithoutborders.peekbookshelf | Allows player to left-click a bookshelf to see the contents of the shelf | | bookswithoutborders.signs | Allows player to create signs that give/encrypt/decrypt books |
| bookswithoutborders.editbookshelf | Allows player to set name/lore for bookshelves, used for peeking | | bookswithoutborders.unsign | Allows player to un-sign books |
| bookswithoutborders.addtitlepage | Allows player to add a blank title page to a book | | bookswithoutborders.setlore | Allows player to set the lore of the currently held item |
| bookswithoutborders.deletepage | Allows player to delete a page from a book |
### Signs ### Signs

View File

@@ -11,106 +11,157 @@ dev-url: https://git.knarcraft.net/EpicKnarvik97/Books-Without-Borders
commands: commands:
bookswithoutborders: bookswithoutborders:
description: Lists Books Without Borders's commands and uses. description: Lists Books Without Borders's commands and uses.
aliases: [ bwb ] aliases:
- bwb
usage: /<command> usage: /<command>
decryptbook: decryptbook:
description: Decrypts the book the player is holding. "key" is required and MUST be IDENTICAL to the key used to encrypt held book description: Decrypts the book the player is holding. "key" is required and MUST be IDENTICAL to the key used to encrypt held book
aliases:
- bwbdecrypt
usage: /<command> <key> usage: /<command> <key>
permission: bookswithoutborders.decrypt permission: bookswithoutborders.decrypt
formatbook: formatbook:
description: Replaces color/formatting codes in a written book with formatted text description: Replaces color/formatting codes in a written book with formatted text
aliases:
- bwbformat
usage: /<command> usage: /<command>
permission: bookswithoutborders.format permission: bookswithoutborders.format
givebook: givebook:
description: Gives the selected player a book from your personal directory description: Gives the selected player a book from your personal directory
aliases:
- bwbgive
usage: /<command> <file name or number> <playername> [# of copies (num)] [signed (true/false)] usage: /<command> <file name or number> <playername> [# of copies (num)] [signed (true/false)]
permission: bookswithoutborders.give permission: bookswithoutborders.give
givepublicbook: givepublicbook:
description: Same as givebook, but uses books from the public directory description: Same as givebook, but uses books from the public directory
aliases:
- bwbgivep
usage: /<command> <file name or number> <playername> [# of copies (num)] [signed (true/false)] usage: /<command> <file name or number> <playername> [# of copies (num)] [signed (true/false)]
permission: bookswithoutborders.givepublic permission: bookswithoutborders.givepublic
groupencryptbook: groupencryptbook:
description: Encrypts book so that only players with the bookswithoutborders.decrypt.<group name> permission may decrypt the book by holding and left clicking the book description: Encrypts book so that only players with the bookswithoutborders.decrypt.<group name> permission may decrypt the book by holding and left clicking the book
aliases:
- bwbgencrypt
usage: /<command> <group name> <key> [encryption style] usage: /<command> <group name> <key> [encryption style]
permission: bookswithoutborders.groupencrypt permission: bookswithoutborders.groupencrypt
deletebook: deletebook:
description: Deletes the specified file in the player's directory description: Deletes the specified file in the player's directory
aliases:
- bwbdelete
usage: /<command> <file name or number> usage: /<command> <file name or number>
permission: bookswithoutborders.delete permission: bookswithoutborders.delete
deletepublicbook: deletepublicbook:
description: Same as deletebook, but deletes files in the public directory description: Same as deletebook, but deletes files in the public directory
aliases:
- bwbdeletep
usage: /<command> <file name of number> usage: /<command> <file name of number>
permission: bookswithoutborders.admin permission: bookswithoutborders.admin
copybook: copybook:
description: Copies the book the player is holding description: Copies the book the player is holding
aliases:
- bwbcopy
usage: /<command> <# of copies> usage: /<command> <# of copies>
permission: bookswithoutborders.copy permission: bookswithoutborders.copy
clearbook: clearbook:
description: Removes all text from the book the player is holding description: Removes all text from the book the player is holding
aliases:
- bwbclear
usage: /<command> usage: /<command>
permission: bookswithoutborders.clear permission: bookswithoutborders.clear
unsignbook: unsignbook:
description: Un-signs the book the player is holding description: Un-signs the book the player is holding
aliases:
- bwbunsign
usage: /<command> usage: /<command>
permission: bookswithoutborders.unsign permission: bookswithoutborders.unsign
encryptbook: encryptbook:
description: 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" or "" description: 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" or ""
aliases:
- bwbencrypt
usage: /<command> <key> [encryption style] usage: /<command> <key> [encryption style]
permission: bookswithoutborders.encrypt permission: bookswithoutborders.encrypt
setbookgeneration: setbookgeneration:
description: Sets the generation of the held book description: Sets the generation of the held book
aliases:
- bwbgeneration
usage: /<command> <generation> usage: /<command> <generation>
permission: bookswithoutborders.setgeneration permission: bookswithoutborders.setgeneration
setbookprice: setbookprice:
description: 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> or <quantity> are specified, the current price to create books will be removed. description: 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> or <quantity> are specified, the current price to create books will be removed.
aliases:
- bwbprice
usage: /<command> <item/eco> <quantity> usage: /<command> <item/eco> <quantity>
permission: bookswithoutborders.setbookprice permission: bookswithoutborders.setbookprice
setlore: setlore:
description: Sets the lore of the item the player is holding. Insert the lore_line_separator character to force a new line ("~" by default) description: Sets the lore of the item the player is holding. Insert the lore_line_separator character to force a new line ("~" by default)
aliases:
- bwblore
usage: /<command> <new lore> usage: /<command> <new lore>
permission: bookswithoutborders.setlore permission: bookswithoutborders.setlore
savepublicbook: savepublicbook:
description: Same as savebook, but saves files in the public directory description: Same as savebook, but saves files in the public directory
aliases:
- bwbsavep
usage: /<command> [overwrite (true/false)] usage: /<command> [overwrite (true/false)]
permission: bookswithoutborders.savepublic permission: bookswithoutborders.savepublic
savebook: savebook:
description: 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 description: 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
aliases:
- bwbsave
usage: /<command> [overwrite (true/false)] usage: /<command> [overwrite (true/false)]
permission: bookswithoutborders.save permission: bookswithoutborders.save
setbookauthor: setbookauthor:
description: Sets the author of the book the player is holding description: Sets the author of the book the player is holding
aliases:
- bwbauthor
usage: /<command> <author> usage: /<command> <author>
permission: bookswithoutborders.setauthor permission: bookswithoutborders.setauthor
settitle: settitle:
description: Sets the title of the book/item the player is holding description: Sets the title of the book/item the player is holding
aliases:
- bwbtitle
usage: /<command> <title> usage: /<command> <title>
permission: bookswithoutborders.settitle permission: bookswithoutborders.settitle
loadbook: loadbook:
description: 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 description: 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
aliases:
- bwbload
usage: /<command> <file name or number> [# of copies] [signed (true/false)] usage: /<command> <file name or number> [# of copies] [signed (true/false)]
permission: bookswithoutborders.load permission: bookswithoutborders.load
loadpublicbook: loadpublicbook:
description: Same as loadbook, but views files in the public directory description: Same as loadbook, but views files in the public directory
aliases:
- bwbloadp
usage: /<command> <file name or number> [# of copies] [signed (true/false)] usage: /<command> <file name or number> [# of copies] [signed (true/false)]
permission: bookswithoutborders.loadpublic permission: bookswithoutborders.loadpublic
reload: reload:
description: Reloads BwB's configuration file description: Reloads BwB's configuration file
aliases:
- bwbreload
usage: /<command> usage: /<command>
permission: bookswithoutborders.reload permission: bookswithoutborders.reload
setBookshelfData: setBookshelfData:
description: Sets custom data for a chiseled bookshelf used when peeking at the bookshelf description: Sets custom data for a chiseled bookshelf used when peeking at the bookshelf
aliases:
- bwbshelfdata
usage: /<command> <delete/name/lore> <text> [more text] usage: /<command> <delete/name/lore> <text> [more text]
permission: bookswithoutborders.editbookshelf permission: bookswithoutborders.editbookshelf
addBookTitlePage: addBookTitlePage:
description: Adds a blank page, title page or chapter page depending on input and whether the book is signed description: Adds a blank page, title page or chapter page depending on input and whether the book is signed
aliases:
- bwbtitlepage
usage: /<command> [page index] [title~description] usage: /<command> [page index] [title~description]
permission: bookswithoutborders.addtitlepage permission: bookswithoutborders.addtitlepage
deleteBookPage: deleteBookPage:
description: Deletes one page from a book description: Deletes one page from a book
aliases:
- bwbdeletepage
usage: /<command> <page> usage: /<command> <page>
permission: bookswithoutborders.deletepage permission: bookswithoutborders.deletepage
migrateBooks: migrateBooks:
description: Migrates all txt books to yml, and fixes any incorrect filenames description: Migrates all txt books to yml, and fixes any incorrect filenames
aliases:
- bwbmigrate
usage: /<command> usage: /<command>
permission: bookswithoutborders.admin permission: bookswithoutborders.admin
permissions: permissions: