book
out of 3884 meta-documentation entries...Name | book |
Object | ItemTag |
Input | MapTag |
Related Tags | <ItemTag.is_book> Returns whether the item is considered an editable book. (...)
<ItemTag.book_title> Returns the title of the book.
<ItemTag.book_author> Returns the author of the book.
<ItemTag.book_pages> Returns the plain-text pages of the book as a ListTag.
|
Description | Changes the information on a book item.
Can have keys "pages" (a ListTag), "title", and "author", all optional. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L207 |
Name | player edits book |
Event Lines | player edits book
player signs book |
Triggers | when a player edits or signs a book. |
Generated Examples | after player edits book:
after player signs book: on player edits book: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.title> returns the name of the book, if any.
<context.pages> returns the number of pages in the book.
<context.book> returns the book item being edited, containing the new page contents.
<context.old_book> returns the book item being edited, containing the old page contents.
<context.signing> returns whether the book is about to be signed.
|
Determine | "NOT_SIGNING" to prevent the book from being signed.
ScriptTag to set the book information to set it to instead. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerEditsBookScriptEvent.java#L23 |
Name | player uses recipe book |
Event Lines | player uses recipe book |
Triggers | when a player interacts with their recipe book. |
Generated Examples | on player uses recipe book: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.recipe> returns the key of the recipe that was clicked.
<context.is_all> returns 'true' if the player is trying to make the maximum amount of items from the recipe, otherwise 'false'.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Paper |
Requires | Paper |
Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerClicksInRecipeBookScriptEvent.java#L14 |
Name | Book Script Containers |
Description | Book script containers are similar to item script containers, except they are specifically
for the book items. They work with the ItemTag object, and can be fetched with the Object Fetcher by using the ItemTag constructor book_script_name Example: - give <player> my_book
|
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/BookScriptContainer.java#L19 |
Name | book_author |
Object | ItemTag |
Input | ElementTag |
Related Tags | <ItemTag.book_author> Returns the author of the book.
|
Description | Changes the author of a book item. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L169 |
Name | book_generation |
Object | ItemTag |
Input | ListTag |
Related Tags | <ItemTag.book_generation> Returns the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED.
|
Description | Sets the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBookGeneration.java#L84 |
Name | book_pages |
Object | ItemTag |
Input | ListTag |
Related Tags | <ItemTag.book_pages> Returns the plain-text pages of the book as a ListTag.
|
Description | Changes the plain-text pages of a book item. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L150 |
Name | book_title |
Object | ItemTag |
Input | ElementTag |
Related Tags | <ItemTag.book_title> Returns the title of the book.
|
Description | Changes the title of a book item. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L188 |
Name | knowledge_book_recipes |
Object | ItemTag |
Input | ListTag |
Related Tags | <ItemTag.knowledge_book_recipes> Returns a recipes unlocked by this knowledge book. Recipes are in the Namespace:Key format, for example "minecraft:gold_nugget". (...)
|
Description | Sets the item's knowledge book recipe list, in the Namespace:Key format. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemKnowledgeBookRecipes.java#L98 |
Name | open_book |
Object | PlayerTag |
Input | None |
Description | Forces the player to open the written book in their hand.
The book can safely be removed from the player's hand without the player closing the book. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3703 |
Name | open_offhand_book |
Object | PlayerTag |
Input | None |
Description | Forces the player to open the written book in their offhand.
The book can safely be removed from the player's offhand without the player closing the book. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3718 |
Name | show_book |
Object | PlayerTag |
Input | ItemTag |
Description | Displays a book to a player. Must be a WRITTEN_BOOK item.
For simple usage, consider specifying a book script name as the input. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3733 |
Name | <EntityTag.bookshelf_slot> |
Returns | ElementTag(Number) |
Description | Returns the Chiseled Bookshelf slot that the entity is looking at, if any.
See also LocationTag.slot |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3238 |
Name | <ItemTag.book_author> |
Returns | ElementTag |
Mechanism | ItemTag.book_author |
Description | Returns the author of the book. |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L58 |
Name | <ItemTag.book_generation> |
Returns | ListTag |
Mechanism | ItemTag.book_generation |
Description | Returns the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED. |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBookGeneration.java#L48 |
Name | <ItemTag.book_map> |
Returns | MapTag |
Mechanism | ItemTag.book |
Description | Returns a MapTag of data about the book, with keys "pages" (a ListTag), and when available, "author" and "title". |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L101 |
Name | <ItemTag.book_pages> |
Returns | ListTag |
Mechanism | ItemTag.book_pages |
Description | Returns the plain-text pages of the book as a ListTag. |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L84 |
Name | <ItemTag.book_title> |
Returns | ElementTag |
Mechanism | ItemTag.book_title |
Description | Returns the title of the book. |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L71 |
Name | <ItemTag.is_book> |
Returns | ElementTag(Boolean) |
Description | Returns whether the item is considered an editable book.
If this returns true, it will enable access to: ItemTag.book, ItemTag.book_author, ItemTag.book_title, and ItemTag.book_pages. |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L519 |
Name | <ItemTag.knowledge_book_recipes> |
Returns | ListTag |
Mechanism | ItemTag.knowledge_book_recipes |
Description | Returns a recipes unlocked by this knowledge book. Recipes are in the Namespace:Key format, for example "minecraft:gold_nugget".
These keys are not necessarily 1:1 with material names, as seen in the example "minecraft:gold_ingot_from_nuggets". |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemKnowledgeBookRecipes.java#L63 |
Name | player discovers recipe |
Event Lines | player discovers recipe |
Triggers | when a player discovers a new item in the recipe book. |
Generated Examples | on player discovers recipe:
after player discovers recipe: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.recipe_id> returns the ID of the recipe discovered.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRecipeDiscoverScriptEvent.java#L14 |
Name | player takes item from lectern |
Event Lines | player takes item from lectern
player takes <item> from lectern |
Triggers | when a player takes a book from a lectern. |
Generated Examples | after player takes item from lectern:
on player takes waxed_weathered_chiseled_copper from lectern: on player takes item from lectern: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.location> returns the LocationTag of the lectern.
<context.item> returns the book ItemTag taken out of the lectern.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerTakesFromLecternScriptEvent.java#L17 |
Name | Take |
Syntax | take [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>) |
Short Description | Takes an item from the player. |
Full Description | Takes items from a player or inventory.
If the player or inventory does not have the item being taken, nothing happens. Using 'slot:' will take the items from that specific slot. Using 'flagged:' with a flag name will take items with the specified flag name, see flag system. Using 'iteminhand' will take from the player's held item slot. Using 'cursoritem' will take from the player's held cursor item (as in, one that's actively being picked up and moved in an inventory screen). Using 'bydisplay:' will take items with the specified display name. Using 'bycover:' will take a written book by the specified book title + author pair. Using 'raw_exact:' (Intentionally undocumented) will compare all raw details of an item exactly. This is almost always a bad idea to use. DO NOT USE. Using 'item:' will take items that match an advanced item matcher, using the system behind Advanced Object Matching. Flagged, Slot, ByDisplay, and Raw_Exact, all take a list as input to take multiple different item types at once. If no quantity is specified, exactly 1 item will be taken. Specifying a raw item without any matching method is considered unreliable and should be avoided. Optionally using 'from:' to specify a specific inventory to take from. If not specified, the linked player's inventory will be used. The options 'iteminhand' and 'cursoritem' require a linked player and will ignore the 'from:' inventory. To take xp from a player, use experience. To take money from a player, use money. |
Related Tags | <PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java#L41 |
Name | magicspells player learns spell |
Event Lines | magicspells player learns spell |
Triggers | when a player is about to learn a spell. |
Generated Examples | after magicspells player learns spell:
on magicspells player learns spell: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.spell_name> returns the name of the spell.
<context.source> returns the source. Can either be SPELLBOOK, TEACH, TOME or OTHER
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Depenizen |
Requires | Depenizen, MagicSpells |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/magicspells/SpellLearnScriptEvent.java#L15 |
Name | player flips lectern page |
Event Lines | player flips lectern page |
Triggers | when the player flips to a page in a lectern. |
Example |
|
Example |
|
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | book:<item> to only process the event if the book on the lectern matches the given item. |
Contexts | <context.book> returns an ItemTag of the book in the lectern.
<context.lectern> returns a LocationTag of the lectern.
<context.old_page> returns an ElementTag(Number) of the last page the player was on.
<context.new_page> returns an ElementTag(Number) of the new page that the player flipped to.
<context.flip_direction> returns the direction in which the player flips the lectern book page, can be either LEFT or RIGHT.
|
Determine | "PAGE:<ElementTag(Number)>" to set the page that the player will flip to. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Paper |
Requires | Paper |
Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerLecternPageChangeScriptEvent.java#L17 |
Name | player prepares item enchant |
Event Lines | player prepares item enchant
player prepares <item> enchant |
Triggers | when a player prepares to enchant an item. |
Generated Examples | on player prepares item enchant:
on player prepares panda_spawn_egg enchant: after player prepares item enchant: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.location> returns the LocationTag of the enchanting block.
<context.item> returns the ItemTag to be enchanted.
<context.bonus> returns an ElementTag(Number) of the enchanting bonus available (number of bookshelves).
<context.offers> returns a ListTag of the available enchanting offers, each as a MapTag with keys 'cost', 'enchantment_type', and 'level'.
|
Determine | "OFFERS:<ListTag>" of MapTags to set the offers available. Cannot be a different size list than the size of context.offers. |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesEnchantScriptEvent.java#L20 |
Name | Denizen Text Formatting |
Description | Denizen provides a variety of special chat format options like "on_hover" and "on_click".
These options exist within Denizen and do not appear in the historical Minecraft legacy chat format that most plugins and systems read. That legacy system has 16 colors (0-9, A-F) and a few toggleable formats (bold, italic, etc). It does not contain anything that needs more than just an on/off. Modern Minecraft, however, supports a JSON based "raw" message format that can do click events, hover events, full RGB colors, etc. Denizen therefore has its own internal system that works like the legacy format system, but also supports the new options normally only available as 'raw JSON'. Because it is entirely processed within Denizen, these options only work within Denizen, when performing actions that support raw JSON input. This magic tool exists to let you write messages without having to write the messy JSON. Be aware that many inputs do not support raw JSON, and as such are limited only the historical Minecraft legacy format. Also be aware that click events, hover events, etc. are exclusively limited to the chat bar and the pages of books, as you cannot mouse over anything else. Also note that RGB colors use a format that Spigot invented, meaning they will work in places that use Spigot's parser OR Denizen's version, but nowhere that uses the vanilla format still. Thanks to Paper's implementation of component APIs where Spigot was too lazy to, Paper servers have advanced text formatting available in more areas. |
Group | Denizen Magic |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/FormattedTextHelper.java#L22 |
Name | Enchantment Script Containers |
Description | Enchantment script containers allow you to register custom item enchantments.
For the most part, they work similarly to vanilla enchantments, albeit with some limitations. These can be attached to enchanted books and used in anvils, and can be generated by the enchanting table (requires discoverable: true and treasure_only: false). In current implementation, custom enchantments do not appear in lore on their own, and will need fake lore added in their place. This might be fixed in the future. It may be beneficial in some cases to restart your server after making changes to enchantments, rather than just reloading scripts. Rarity, Category, and Slots do not apply changes to an already-loaded script until the next restart (except when the script is newly added). Using these may cause unpredictable compatibility issues with external plugins. Enchantment scripts can be automatically disabled by adding "enabled: false" as a root key (supports any load-time-parseable tags).
|
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EnchantmentScriptContainer.java#L33 |
Name | Item Script Containers |
Description | Item script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond The following is the format for the container. Except for the 'material' key (and the dScript required 'type' key), all other keys are optional.
|
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/ItemScriptContainer.java#L30 |
Name | last_interacted_slot |
Object | LocationTag |
Input | ElementTag(Number) |
Related Tags | <LocationTag.last_interacted_slot> Returns the last interacted slot of a Chiseled Bookshelf inventory.
|
Description | Sets the last interacted slot of a Chiseled Bookshelf inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4537 |
Name | page |
Object | LocationTag |
Input | ElementTag(Number) |
Related Tags | <LocationTag.page> Returns the current page on display in the book on this Lectern block.
|
Description | Sets the page currently displayed on the book in a lectern block. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4556 |
Name | <LocationTag.last_interacted_slot> |
Returns | ElementTag(Number) |
Mechanism | LocationTag.last_interacted_slot |
Description | Returns the last interacted slot of a Chiseled Bookshelf inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4284 |
Name | <LocationTag.page> |
Returns | ElementTag(Number) |
Mechanism | LocationTag.page |
Description | Returns the current page on display in the book on this Lectern block. |
Generated Example |
|
Group | world |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L3707 |
Name | <LocationTag.slot[<vector>]> |
Returns | ElementTag(Number) |
Description | Returns the appropriate slot based on a given point along the bookshelves' surface relative to its position.
It will return 0 if the given vector is not within the bounds of any slot. See also EntityTag.bookshelf_slot |
Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4491 |
Name | <p> |
Returns | ElementTag |
Description | Returns a paragraph, for use in books. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/TextTagBase.java#L25 |