-
Notifications
You must be signed in to change notification settings - Fork 13
Create a Book
Leonardo Di Gianfelice Stornelli edited this page Jun 4, 2023
·
2 revisions
First of all, you have to create a new file with extension .yml in the books folder, the name of the file removing the extension will be the book id.
# This is an example book to show how to create one
# Note: The placeholders in this book (like %player_name%) need PlaceholderAPI installed
# with the proper expansions, see here for more information: https://www.spigotmc.org/resources/placeholderapi.6245/
# Item's name
name: ExampleName
# Book's title
title: ExampleTitle
# Book's author
author: ExampleAuthor
# Book's generation
# Valid values: ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, TATTERED
generation: ORIGINAL
# Item's lore
lore:
- Example lore 1
- Example lore 2
# Command to open this book
# You can remove this by setting it to ''
# Separate multiple commands with a space
open_command: 'examplebook'
# For the placeholders to work correctly
# you have to download the Vault plugin:
# https://www.spigotmc.org/resources/vault.34315/
# and the Player and Vault expansions for PlaceholderAPI:
# /papi ecloud download Player
# /papi ecloud download Vault
# /papi reload
pages:
'1':
- '<hover:show_text:"I''m a tooltip">Hover here to see a tooltip</hover:show_text>'
- '<hover:show_text:"Run the command "/examplecommand""><click:run_command:/examplecommand>Click here to run a command<reset>'
- '<click:open_url:"https://www.spigotmc.org/resources/45604/">Click here to open a link</click>'
'2':
- '<red>Example placeholders</red>'
- ''
- 'Name: <green>%player_name%</green>'
- 'Level: <gold>%player_level%</gold>'
- 'Gamemode: <red>%player_gamemode%</red>'
- 'Balance: <gold>%vault_eco_balance%</gold>'
- 'Online players: <dark_red>%server_online%</dark_red>'
The section "pages" contains the pages of book, '1', '2'... are the pages, and each - 'line content here'
is a line.
Tags are used for create effects on the text, such as show text when hovering with the mouse or open a link. InteractiveBooks uses MiniMessage to parse these tags, so you can check what is possible in the MiniMessage documentation.