VirtualBooks | 1.8.8 - 1.21 icon

VirtualBooks | 1.8.8 - 1.21 -----

Need to see information in a cool way? Look no further!



MainBanner.png


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!

Main Features.png

  • 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!
Installation.png
  1. Download VirtualBooks.jar from this page.
  2. Put the VirtualBooks.jar in your plugins folder.
  3. Restart your server so the config.yml and other necessary files may generate.
  4. Add the books you like (an example book is given in Books folder)
  5. Use /vb reload to reload all the files.
  6. Enjoy!
Code (YAML):

############################################################

# +------------------------------------------------------+ #

# | VirtualBooks | #

# | By TheBlazingPro | #

# | Thanks for downloading! | #

# +------------------------------------------------------+ #

############################################################





############################################################

# +------------------------------------------------------+ #

# | No Permission Message | #

# | This no permission is used throughout the plugin | #

# | You can change it to whatever you want. | #

# | (Also supports PlaceholderAPI) | #

# +------------------------------------------------------+ #

############################################################



No_Permission_Msg
: "&cYou do not have permission to run this command!"

join_books_bypass
: "joinbook.bypass"



############################################################

# +------------------------------------------------------+ #

# | On Join Book | #

# | Type the name of the book file from the books folder.| #

# | Also include .yml in the file name. | #

# | Won't be opened if the person is joining for | #

# | the first time! This is default but can be changed! | #

# | You can also set a custom delay for the book to open!| #

# | Minimum 2s is required for proper functioning! | #

# | You can also set a required permission, only players | #

# | with this permission will get the book. This can be | #

# | left empty! | #

# +------------------------------------------------------+ #

############################################################



on-join-book
: "join.yml"

physical-on-join-book
: false

on_join_book_delay
: 2 # This is in seconds.

on_join_book_permission
: ""



############################################################

# +------------------------------------------------------+ #

# | On First-Join Book | #

# | Type the name of the book file from the books folder.| #

# | Also include .yml in the file name. | #

# | Will be opened to the person joining for the first | #

# | time on the server! This is default but changeable! | #

# | You can also set a custom delay for the book to open!| #

# | Minimum 2s is required for proper functioning! | #

# | You can also set a required permission, only players | #

# | with this permission will get the book. This can be | #

# | left empty! | #

# +------------------------------------------------------+ #

############################################################



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
: ""



############################################################

# +------------------------------------------------------+ #

# | Creating a Book | #

# | You can create as many books as you like. | #

# | Just create a <name>.yml file in the books folder | #

# | and follow the format below (without #) | #

# | You can also duplicate the thanks.yml file given | #

# | and edit as per your liking. Format is given below. | #

# | Every option is necessary! | #

# | Now also supports json! Example json given below! | #

# +------------------------------------------------------+ #

############################################################



############################################################

# +------------------------------------------------------+ #

#

# command: "thanks" #This command will be used to access the book!

# permission: "thanks.book" #This is the permission for the command

# physical: false #Changing this to true will give a physical copy of the book

# command_aliases:

# - 'thank_you'

# - 'ty'

# Title: "ThanksBook" #This will be the title if the book is given physically!

# Author: "TheBlazingPro" #Book author if book given physically!

# pages:

#

# '1': #Page Number - You can create as many pages as you like!

# - "&2&lExample Help!&r" #Page line - Each line here represents a line on the book page.

# - "{json}"

# - "*/help: Shows help!" #You may use color codes here. NOTE: Color codes also count as a character!

# - "*Forums: forum.servername.com" #PlaceholderAPI supported!

# - "*/report: Report hackers or cheaters!"

# '2':

# - "&2&lThanks for downloading!"

# - "&c<3 - TheBlazingPro"

#

#

# examplejson: #You can name this anything. Then just put {name} anywhere in the plugin!

# TEXT: "&c[JSON]" #This part is necessary. This is the text that will display in the book!

# HOVER_TEXT: "&aThis is the tooltip!" #This is optional. Will display something when hovering over the json!

# CLICK_EVENT: #Click event will be activated when clicked on the json

# OPEN_URL: "https://spigotmc.org" #OPEN_URL will open a url. Can be replaced with RUN_COMMAND or CHANGE_PAGE

# #Everything supports PlaceholderAPI

# #Example json book given in bookfolder. Run the command /jsonexample to see it!

# lore:

# - "&cLore line 1" #Lore can be added to physical books

# - "&6Lore line 2" #Lores also support PlaceholderAPI!

# #

# +------------------------------------------------------+ #

############################################################



############################################################

# +------------------------------------------------------+ #

# | Please restart server after adding/editing books | #

# | Or use /vb reload | #

# +------------------------------------------------------+ #

############################################################




 

Commands.png

  • /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
    /vb create TestBook testcommand virtualbooks.testbook
  • 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!
CreatingBooks.png

  1. Locate the Books folder in the VirtualBooks folder.
  2. 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'
     
  3. Each option is important!
  4. Restart the server or use /vb reload to reload the files!
  5. 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!)
  6. The plugin also supports PlaceHolderAPI so you can use the placeholders given here.
  7. Books also support JSONS! Information regarding the same given below!
  8. If you don't want a book to have any permission, please REMOVE the permission tag altogether. Not doing so will cause errors!
  9. 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
Jsons.png

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.



Examples.png

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!
JsonExample.png

Permission: jsonexample.perm
Command: /jsonexample
Code (YAML):

command
: jsonexample
permission
: jsonexample.perm
Title
: 'JsonExample'
Author
: 'TheBlazingPro'
pages
:
  '1'
:
 - '& #FFCB00S&#FFBA00e&#FFA900r&#FF9700v&#FF8600e&#FF7500r &#FF6400S&#FF5300t&#FF4100a&#FF3000t&#FF1F00s'
  - ' '
  - '&c* {tps }'
  - '&c* {ram }'
  - '&c* {players }'
tps
:
  TEXT
: '& #8DE9AB[&#6DC285T&#4E9B60P&#2E733AS&#0E4C14]'
  HOVER_TEXT
: ' %server_tps%'
  CLICK_EVENT
:
    OPEN_URL
: https://spigotmc.org
ram
:
  TEXT
: '& #8DE9AB[&#6DC285R&#4E9B60A&#2E733AM&#0E4C14]'
  HOVER_TEXT
: '&2 %server_ram_used%/%server_ram_max%'
  CLICK_EVENT
:
    OPEN_URL
: https://spigotmc.org
players
:
  TEXT
: '& #8DE9AB[&#7DD598P&#6DC285L&#5DAE72A&#4E9B60Y&#3E874DE&#2E733AR&#1E6027S&#0E4C14]'
  HOVER_TEXT
: '&2 %server_online%/%server_max_players%'
  CLICK_EVENT
:
    SEND_MSG_TO_PLAYER
: https://spigotmc.org


 

2. RuleBook displaying some rules

rulebook.png

Command: /rules
Permission: rulebook.perm
Code (YAML):
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!

TOS.png

    • 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! :D
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!
Resource Information
Author:
----------
Total Downloads: 4,913
First Release: May 10, 2020
Last Update: Oct 24, 2024
Category: ---------------
All-Time Rating:
35 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings