Finding a way to display information in a nice way but don't want your chat to be flooded? Look no further. Introducing VirtualBooks. It allows you to create any number of books that can be opened with your own designated command! This opens a virtual book so you have no need to have an extra inventory slot for the book. Also, the plugin supports any number of pages and you can also use PlaceholderAPI and JSONS!
Extremely Lightweight
No dependencies
Unlimited page support
Color code support
Hex Color support
Multiversion Support (1.8.8 - 1.20.x)
Easy to add more pages
A single book can be assigned multiple commands
Simply add the following to any of your book.yml file:
Code (YAML):
command_aliases: - 'alias1'
- 'alias2'
You can add as many aliases as possible!
All books can be converted to physical books!
Lore can be added to physical book!
Book generation can be changed (NOTE: Only 1.13+) this includes: Original, Copy, Copy of Copy, and Tattered.
Book generation can be changed by adding the
condition string to your
book.yml file and by choosing amongst
original, copy, copy_of_copy, tattered.
Code (YAML):
condition: original
condition: copy
condition: copy_of_copy
condition: tattered
Doesn't consume inventory space
Ability to create unlimited virtual books
PlaceholderAPI support to make some of the coolest books
Supports First Join and On Join books! Simply add their names in the config and you are done! Also available as physical books!
This can be done by locating the option
on-join-book in the config.yml file and writing the name of any book from the
Books folder.
MUST INCLUDE .yml ! You can also turn this into a physical book by changing
physical-on-join-book to
true. You can also set a custom delay by changing the value in
on_join_book_delay. You can also set a join book permission, so only those with this permission will have the book displayed (can be left empty). This can be done by adding a permission under
on_join_book_permission.
This can be done by locating the option
on-first-join-book in the config.yml file and writing the name of any book from the
Books folder.
MUST INCLUDE .yml ! You can also turn this into a physical book by changing
physical-on-first-join-book to
true. You can also set a custom delay by changing the value in first_join_book_delay. You can also set a first join book permission, so only those with this permission will have the book displayed (can be left empty). This can be done by adding a permission under
on_first_join_book_permission.
First Join and Join Books can be bypassed for server operators or moderators, by setting the join_books_bypass permission in the config.yml file and those with the permissions will not have the book displayed / given to them!
Code (YAML):
join_books_bypass: "joinbook.bypass"
SUPPORTS JSONS! More info on the page on how to create and use jsons in the book!
All book commands get registered!
You can also give players a physical copy of the book! NOTE: If you are updating, you will need to add "Title" and "Author" strings in your book.yml file if you want them to reflect in a physical copy. The plugin will work fine otherwise as well, the title and author would be blank by default.
You can also announce signed books to everyone on the server, and announce in other ways aswell! (More info below)
NOTE: The latest version does not work on versions below 1.8.8!
Download VirtualBooks.jar from this page.
Put the VirtualBooks.jar in your plugins folder.
Restart your server so the config.yml and other necessary files may generate.
Add the books you like (an example book is given in Books folder)
on-first-join-book: "firstjoin.yml" physical-on-first-join-book: false
first_join_book_delay: 2
# This is in seconds. on_first_join_book_permission: ""
/vb help - Displays the help page - virtualbooks.command.help
/vb list - Lists the available books and their commands - virtualbooks.command.list
/vb reload - Reloads the files - virtualbooks.command.reload
/vb announce [<text>] - Anything after announce will be announced to all the players playing on the server! Also supports PlaceholderAPI and color codes! You can also hold a signed book in hand and just type /vb announce to announce that book to everyone! - virtualbooks.command.announce
/vb announcebook <BookFile> - Can be used to announce any book from the books folder. Be sure to include .yml in the file name while announcing! - virtualbooks.command.announcebook
/vb announcebook jsonexample.yml
/vb open <bookFile> <Player> - Can be used to open any book from the books folder to any player on the server. Be sure to include .yml in the file name while opening a book! - virtualbooks.command.open
/vb open jsonexample.yml Blqz
/vb give <bookFile> <Player> - Can be used to give any book as a physical copy to the player. Be sure to include .yml in the file name while giving a book! - virtualbooks.command.give
/vb give jsonexample.yml Blqz
/vb create <bookName> <command> [<permission>/none] - Can be used to create a .yml file of a held signed book. DO NOT include .yml in the bookname while running the command! - virtualbooks.command.create
Permission for each command is given next to the command in bold!
If you want to give all permissions together, simply give the permission virtualbooks.command.*
All commands have tab completion!
Locate the Books folder in the VirtualBooks folder.
Either duplicate the given Thanks.yml to create a new book or copy it exactly.
Code (YAML):
command: thanks
permission: thanks.perm
Title: 'ThanksBook'
Author: 'TheBlazingPro'
condition: 'original'
pages:
'1': - '&2Thanks for downloading the plugin'
- ' '
- '&cMade with love by'
- '&c -TheBlazingPro <3'
Each option is important!
Restart the server or use /vb reload to reload the files!
That's it! Enjoy your book! (Be sure to give your players access to the book or they won't be able to use it!)
The plugin also supports PlaceHolderAPI so you can use the placeholders given here.
Books also support JSONS! Information regarding the same given below!
If you don't want a book to have any permission, please REMOVE the permission tag altogether. Not doing so will cause errors!
You can also create a book by holding a signed book in hand and running the /vb create <bookName> <command> [<permission>/none] command! If you don't want a permission for the book, just put "none" in the command. DO NOT include .yml in the bookname while running the command!
/vb create TestBook testcommand none
The books support JSONS and creating them is very easy! An example json that can be created in any book file:
Code (YAML):
examplejson:
TEXT: "&c[TEST]" HOVER_TEXT: "&aThis is displayed while hovering! %player_name%" CLICK_EVENT:
RUN_COMMAND: "/vb help" SEND_MSG_TO_PLAYER: "&cHi!" RUN_COMMAND_AS_CONSOLE: "gamemode creative %player_name%"
Here, examplejson, can be any name of your choice.
The string TEXT is needed. This will be the actual sentence/word displayed in the work. (Also supports PlaceholderAPI)
HOVER_TEXT is displayed when you hover over the given JSON. This is optional.
CLICK_EVENT is also optional. Triggered when you click on the JSON. This supports multiple actions. They are: 1. RUN_COMMAND - Will run a command 2. CHANGE_PAGE - Will change page within the book Just type the page number. 3. OPEN_URL - Will open a URL 4. SEND_MSG_TO_PLAYER - Sends a message to the player when clicked on. This also supports PlaceholderAPI. 5. RUN_COMMAND_AS_CONSOLE - Run a single command or multiple commands as console.
Code (YAML):
MULTI_COMMAND:
TEXT: "[CLICK ME]" HOVER_TEXT: "&9Click to run multiple commands!" CLICK_EVENT:
RUN_COMMAND_AS_CONSOLE: "first command, second command, third command"
6. OPEN_BOOK - Opens a book. Add bookfile name here! Do INCLUDE .yml!
Code (YAML):
examplejson:
TEXT: '&c&l
[OPEN BOOK
]'
HOVER_TEXT: '&aClick to open book'
CLICK_EVENT:
OPEN_BOOK: "Thanks.yml"
7. SUGGEST_COMMAND - Sends player a message on which the player can click to get a command suggestion in chat. Example is given here.
Code (YAML):
examplejson:
TEXT: '&c&l
[SUGGEST COMMAND
]'
HOVER_TEXT: '&aClick to suggest command'
CLICK_EVENT:
SUGGEST_COMMAND:
MESSAGE: "&aThis is the message sent in chat" HOVER_TEXT: "&6This is the message hover text" COMMAND: "/command"
You can only use one action at a time in CLICK_EVENT
In RUN_COMMAND include / before the command! If you do not put the slash, it will just send a message!
DO NOT include a / in the command!
NOTE: At a time, only one of the above three can be used in click event!
After you create a json, just use
{examplejson} anywhere in the book and it will be replaced with the json!
Here examplejson is the name of the json created.
YOU CAN CREATE AS MANY JSONS YOU LIKE IN A BOOK. EVERYTHING SUPPORTS PAPI!
An example of Json Book is given below!
NOTE: This is also compatible in announce commands and open commands! Also compatible in on-join and on-first-join.
1.
ServerStats book using
PlaceholderAPI and
JSONS. Displays server TPS, RAM, and online players while hovering over the objects!
NOTE: HEX Color codes only supported above and including 1.16!
command: rules
permission: rulebook.perm
pages:
'1': - '&6Rules'
- ' '
- '&c*Do not use hacked clients!'
- '&c*Do not swear!'
- '&c*Do not exploit bugs!'
The possibilities are endless with virtual books! So get creating and give your server a unique twist!
Do not rate the plugin if you have issues. Ask for support first.
Only logical suggestions will be accepted.
Do not report issues in the review section
Before reporting or suggesting anything make sure that you have the latest plugin version.
Do not report bugs or glitches or give suggestions in the discussion section.
Do not decompile the plugin to view or modify the code for personal or/and commercial use.
We're not responsible if another plugin breaks any of the functions related to this plugin. However, we can try fixing that for you.
You are not allowed to redistribute the plugin in any form.
You agree to these Terms when downloading this plugin.
For support kindly message me on spigot or join my discord
here.
Discord is fastest way to get a response!
Thank you for downloading the plugin! I hope you enjoy it! Please rate the plugin if you enjoy it Also, consider donating if you want to support me! Donations help a lot! They aren't required but are always appreciated! Link above or click here!