# Table of Contents - [Tooltips](#tooltips) - [Support | Tooltips](#support-tooltips) - [Commands | Tooltips](#commands-tooltips) - [Features | Tooltips](#features-tooltips) - [Theme | Tooltips](#theme-tooltips) - [Guides | Tooltips](#guides-tooltips) - [FAQ | Tooltips](#faq-tooltips) - [Theme textures | Tooltips](#theme-textures-tooltips) - [Clearing cache | Tooltips](#clearing-cache-tooltips) - [Making a custom theme | Tooltips](#making-a-custom-theme-tooltips) - [Manual width | Tooltips](#manual-width-tooltips) - [Furniture shop | Tooltips](#furniture-shop-tooltips) - [BetonQuest Dialogue | Tooltips](#betonquest-dialogue-tooltips) - [Languages | Tooltips](#languages-tooltips) - [Icon | Tooltips](#icon-tooltips) - [Conditions | Tooltips](#conditions-tooltips) - [Commands | Tooltips](#commands-tooltips) - [Actions | Tooltips](#actions-tooltips) - [Condition list | Tooltips](#condition-list-tooltips) - [Preset | Tooltips](#preset-tooltips) - [Variables | Tooltips](#variables-tooltips) - [API | Tooltips](#api-tooltips) - [Notable 2.0 Changes | Tooltips](#notable-2-0-changes-tooltips) - [Integrations | Tooltips](#integrations-tooltips) - [Custom Conditions | Tooltips](#custom-conditions-tooltips) - [Argument Types | Tooltips](#argument-types-tooltips) - [Show | Tooltips](#show-tooltips) - [Functions | Tooltips](#functions-tooltips) - [Animations | Tooltips](#animations-tooltips) - [Local Placeholders | Tooltips](#local-placeholders-tooltips) - [Unknown](#unknown) - [Selling furniture | Tooltips](#selling-furniture-tooltips) - [Unknown](#unknown) - [Dynamic pricing | Tooltips](#dynamic-pricing-tooltips) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Start here | Tooltips](#start-here-tooltips) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) --- # Tooltips ![Page cover](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F5p5TcVluHjsWZfJ6vPDc%252FScreenshot_6.png%3Falt%3Dmedia%26token%3Dee53daae-baa5-4198-a8b2-90cb456158e4&width=1248&dpr=3&quality=100&sign=10d39436&sv=2) For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/tooltips.md) . Welcome to the [Tooltips plugin](https://spigotmc.org/resources/109912) documentation. ### [](https://tooltips.gitbook.io/tooltips#first-setup) First setup [Start here](https://tooltips.gitbook.io/tooltips/start-here) ### [](https://tooltips.gitbook.io/tooltips#learn-the-basics) Learn the basics [Features](https://tooltips.gitbook.io/tooltips/plugin/features) ### [](https://tooltips.gitbook.io/tooltips#stuck) Stuck? [Support](https://tooltips.gitbook.io/tooltips/support) [NextStart here](https://tooltips.gitbook.io/tooltips/start-here) Last updated 1 year ago --- # Support | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/support.md) . ### [](https://tooltips.gitbook.io/tooltips/support#discord) Discord Support is offered in the Sep Support Discord server! [![Logo](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2Fdiscord.com%2Fassets%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=3d53a264&sv=2)Join the Tooltips Support Discord Server!Discord](https://discord.com/invite/5Zkzj7fanm) ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2Fdiscordapp.com%2Fapi%2Fguilds%2F1108419327591460906%2Fwidget.png%3Fstyle%3Dshield&width=768&dpr=3&quality=100&sign=31f20e&sv=2) [PreviousStart here](https://tooltips.gitbook.io/tooltips/start-here) [NextFeatures](https://tooltips.gitbook.io/tooltips/plugin/features) Last updated 1 year ago --- # Commands | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/commands.md) . [](https://tooltips.gitbook.io/tooltips/plugin/commands#sending-themes-and-presets) Sending themes and presets ------------------------------------------------------------------------------------------------------------------- These are intended only for testing the themes and presets. Please use [conditions](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions) to display tooltips. * `/tt sendtheme [player] [theme id] (optional text)` * permission: `tooltips.command.sendtheme` * `/tt sendpreset [player] [preset id] (optional text)` * permission: `tooltips.command.sendpreset` * Both allow optional text, which supports multiple lines using new lines "\\n". * Text supports PAPI placeholders and local placeholders. * If a preset already defines text, putting optional text in will override the preset text. * Sending presets with a command **does not account for conditions**. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FnlCD0Zfcribso64Vycwr%252Fimage.png%3Falt%3Dmedia%26token%3Df6325d55-86a1-4a07-a1e5-db64167a8e82&width=768&dpr=3&quality=100&sign=f94581f8&sv=2) [](https://tooltips.gitbook.io/tooltips/plugin/commands#debugging-presets) Debugging presets ------------------------------------------------------------------------------------------------- Your preset isn't showing and you're not sure why? This command should help! It checks all conditions one by one and tells you whether a tooltip would show or not. * `/tt debug [preset] [player]` * permission: `tooltips.command.debug` ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FypfKLGo0gY3gQxYY22rK%252Fimage.png%3Falt%3Dmedia%26token%3D1797caae-82fa-450c-bcab-6793f5a2f460&width=768&dpr=3&quality=100&sign=d24565ec&sv=2) ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FsEcojuZ8JRhiG7AGUBNy%252Fimage.png%3Falt%3Dmedia%26token%3Da3db9ddd-c59d-4ca3-b084-8d7998d43591&width=768&dpr=3&quality=100&sign=46312f24&sv=2) [](https://tooltips.gitbook.io/tooltips/plugin/commands#evaluating-conditions) Evaluating conditions --------------------------------------------------------------------------------------------------------- Read more about conditions [here](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions) . A useful tool when working on conditions, is to see if they work. This can be done using the eval command: * `/tt eval [condition]` * permission: `tooltips.command.eval` ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FSXcvZBqGsH26kiw9eyIS%252Fimage.png%3Falt%3Dmedia%26token%3D0b688e6a-909c-42d9-96b8-98cefc1d7fac&width=768&dpr=3&quality=100&sign=9b088e72&sv=2) [](https://tooltips.gitbook.io/tooltips/plugin/commands#reloading-the-plugin) Reloading the plugin ------------------------------------------------------------------------------------------------------- Reloading the plugin will reload all themes, icons and presets and regenerate the required assets. * `/tt reload` * permission: `tooltips.command.reload` If you're using a plugin like Oraxen or ItemsAdder, remember to use their respective resource pack reload commands _after_ using /tt reload; `/oraxen reload pack` and `/iazip` Haven't set up Nexo or ItemsAdder compatibility? Head to [this page](https://tooltips.gitbook.io/tooltips/start-here) . [](https://tooltips.gitbook.io/tooltips/plugin/commands#variable-commands) Variable Commands ------------------------------------------------------------------------------------------------- Execute a local variable command. The use of this is to allow outside modification of Tooltips variables. * `/tt vars [`[`variable command`](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#variables)\ `]` * permission: `tooltips.command.vars` **Examples** /tt vars setvar Septicuss meow true /tt vars setpersistentvar player meow false (this will actually set it for the person executing the command) /tt vars clearvars global /tt vars savepersistentvars [PreviousFeatures](https://tooltips.gitbook.io/tooltips/plugin/features) [NextFAQ](https://tooltips.gitbook.io/tooltips/plugin/faq) Last updated 1 year ago --- # Features | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/features.md) . * [Themes](https://tooltips.gitbook.io/tooltips/configuration/theme) are used to define how a tooltip looks. * The height of the tooltip * How many text lines it supports * The height at which text starts appearing * The vertical spacing between lines * [Presets](https://tooltips.gitbook.io/tooltips/configuration/preset) are used to pre-set extra properties for tooltips. * Defines text ([MiniMessage format](https://docs.advntr.dev/minimessage/format.html) ) * [Animations](https://tooltips.gitbook.io/tooltips/configuration/preset/animations) to animate the text * [Functions](https://tooltips.gitbook.io/tooltips/configuration/preset/functions) to create more complex text * Defines the fade property (tooltip fade in, stay and fade out) * How it's displayed * [Theme](https://tooltips.gitbook.io/tooltips/configuration/theme) * Color * Horizontal shift * [Conditions](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions) (display the tooltip based on certain conditions) * [Show](https://tooltips.gitbook.io/tooltips/configuration/preset/show) (how a tooltip is shown if conditions are true) * [Actions](https://tooltips.gitbook.io/tooltips/configuration/preset/actions) (interaction when a tooltip is shown) * [Variables](https://tooltips.gitbook.io/tooltips/extra/variables) is a feature used in Tooltips to support more complex behavior. They allow you to for example: * Create a tooltip that is only shown once to a player * Create a sequence of tooltips, for example a tutorial that moves to the next page on right click * Create a shop with a confirmation [PreviousSupport](https://tooltips.gitbook.io/tooltips/support) [NextCommands](https://tooltips.gitbook.io/tooltips/plugin/commands) Last updated 1 year ago --- # Theme | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/theme.md) . This page covers how to create custom themes, which involves editing pixel textures. The plugin already offers several standard themes, so if those are sufficient - [here's](https://tooltips.gitbook.io/tooltips/plugin/commands#sending-themes-and-presets) how to use them. Themes define how tooltips look. They provide the texture, define how many lines the theme supports and some ascent settings. [](https://tooltips.gitbook.io/tooltips/configuration/theme#where) Where to configure themes ------------------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/theme#configuration) Configuration Themes are configured inside `plugins/Tooltips/themes`. Any `.yml` file inside of that folder or any subfolders will be checked for theme configurations. So you can configure your themes for example in: * `/themes/mythemes.yml` * `/themes/mythemes/themes.yml` Where `mythemes` -name can be anything you want. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F2Ik5lZQ9bJK4ntmXLS7y%252Fimage.png%3Falt%3Dmedia%26token%3Dc2505fc5-3135-470f-81dc-b77c0f66d21a&width=768&dpr=3&quality=100&sign=93541af5&sv=2) All themes go in this directory ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fup9lSH0Qpw0wFd3Rt7Jx%252Fimage.png%3Falt%3Dmedia%26token%3Df01d300a-dffd-4367-a2a4-6615bdc123da&width=768&dpr=3&quality=100&sign=299f8b43&sv=2) Any file name ending with .yml is supported. Even in sub-directories created inside `themes` ### [](https://tooltips.gitbook.io/tooltips/configuration/theme#textures) Textures Textures for themes have to be located inside `plugins/Tooltips/pack/assets`. That path resembles a normal resource pack, which supports [namespaces](https://minecraft.wiki/w/Tutorials/Creating_a_resource_pack#Adding_a_namespace_folder) . * * * [](https://tooltips.gitbook.io/tooltips/configuration/theme#example-configuration) Example configuration ------------------------------------------------------------------------------------------------------------- ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FPee4GrKmVN3sIFOHh6Tk%252Fimage.png%3Falt%3Dmedia%26token%3Db45be72d-480e-43c1-9661-6371a1f97e79&width=768&dpr=3&quality=100&sign=f12994d3&sv=2) Example used 182B [theme-one.png](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2FZCXfFgRa0StmxT3h86cu%2Ftheme-one.png?alt=media&token=4a718785-1b0b-46af-8df3-dcef55e0d32e) image Download[Open](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2FZCXfFgRa0StmxT3h86cu%2Ftheme-one.png?alt=media&token=4a718785-1b0b-46af-8df3-dcef55e0d32e) Texture used above Copy theme-one: path: "tooltips:tooltips/theme-one.png" height: 10 padding: # Optional left: 1 right: 0 lines: 1 ascents: theme-ascent: 0 text-start-ascent: -3 text-line-spacing: 5 ### [](https://tooltips.gitbook.io/tooltips/configuration/theme#properties) Properties #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#path) path The path to the texture inside `.../pack/assets/`. Uses namespaces, exactly how Minecrafts namespaces work. Example texture used is located in `.../pack/assets/``tooltips``/textures/tooltips/theme-one.png`. Where the highlighted part is the namespace used ( `tooltips:` ). The amount of lines that a theme supports depends on the texture and its height. You will have to edit the textures yourself if you wish to support more lines. [Here's how](https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures) . #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#height) height Property that controls the size of the texture. Normally when working with fonts, this value would be equal to the height of the texture in pixels. However when working with tooltips, that would result in a texture that is overly large. That's why the best height is usually the textures size divided by two. In the example above, `theme-one.png` textures height is 20 pixels, so it's height is set as 10. If it was instead 20 pixels, it would look like this: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FnmcLgAn0X7KBBtMjqixd%252Fimage.png%3Falt%3Dmedia%26token%3D8a817d9d-5a9a-49c0-bb66-50222c9ad7bf&width=768&dpr=3&quality=100&sign=b3aa6e3c&sv=2) height: 20 #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#undefined) #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#padding) padding Defines how much space (in pixels) is added to the left or right part of the text. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FpqLaUZPs361BXM7tU15p%252Fimage.png%3Falt%3Dmedia%26token%3Df8a3b7cf-1851-4934-b6fd-76dfa19613e5&width=768&dpr=3&quality=100&sign=20462ec0&sv=2) padding: 2 #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#undefined-1) #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#lines) lines How many lines does this theme support. This affects how many line files the plugin generates. If a tooltip uses more lines than its theme supports, the extra lines will show up broken. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FIwzdqm8eUZvxQxMUBgLr%252Fimage.png%3Falt%3Dmedia%26token%3D0cdf6089-6e0e-43f0-ab15-0b2ab9fadd3d&width=768&dpr=3&quality=100&sign=d114ea3a&sv=2) lines: 1, but we're trying to add two lines through the newline "\\n" The amount of lines that is put here does _**not**_ change the height of the texture. You will have to do that yourself using [this guide](https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures) . #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#ascents) ascents Acents in resource packs define how high something is offset from its origin point. The higher the ascent is, the higher the offset is vertically (up). The lower it is, the lower the offset is vertically (down). Can go in the negatives. #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#theme-ascent) theme-ascent Defines how high the theme is displayed. Can at maximum be as much as the height of the theme. Minimum is not limited. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FIrQFco1jJg7N2Y80TBFq%252Fimage.png%3Falt%3Dmedia%26token%3D308c30a8-a4af-4fd5-a8f8-7a6f0ae43841&width=768&dpr=3&quality=100&sign=f7262fb3&sv=2) theme-ascent: 0 ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FENVDkVAbJkJMCxd9KgOR%252Fimage.png%3Falt%3Dmedia%26token%3D18c13dd5-9d5e-48bc-b00c-1bbad88d7793&width=768&dpr=3&quality=100&sign=2814d69a&sv=2) theme-ascent: -10 (text-start-ascent must also be modified) #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#text-start-ascent) text-start-ascent Defines how high the first line of text is displayed. Can at max be 5, due to the fonts height being 5. Minimum is not limited. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FyiWND9Va5gqm3f28lRzx%252Fimage.png%3Falt%3Dmedia%26token%3Dc9355141-3919-421e-ae3a-d5c3d8801ca2&width=768&dpr=3&quality=100&sign=f6b8dc8f&sv=2) theme-ascent: 0 and text-start-ascent: 0 ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FB05IOPB5ylJueA131m2g%252Fimage.png%3Falt%3Dmedia%26token%3Dea5c7ad9-1fbb-4e3d-9fb5-08092cc6cb6d&width=768&dpr=3&quality=100&sign=11be1b47&sv=2) theme-ascent: 0 and text-start-ascent: -3 #### [](https://tooltips.gitbook.io/tooltips/configuration/theme#text-line-spacing) text-line-spacing Is an useful option for multi-line tooltips. Defines in pixels the space between each new line. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F6wzZYh8sSVGNLpLZBdkW%252Fimage.png%3Falt%3Dmedia%26token%3Dcb6003e4-dd9f-408d-8c6c-530a1842ae8c&width=768&dpr=3&quality=100&sign=e73304d2&sv=2) text-line-spacing: 5 ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F3nVgVPtRzOB5kJh9AYHp%252Fimage.png%3Falt%3Dmedia%26token%3D9b930781-3a91-4ffc-88b6-5b4fdf2d8084&width=768&dpr=3&quality=100&sign=748d1893&sv=2) text-line-spacing: 3 [PreviousManual width](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width) [NextTheme textures](https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures) Last updated 1 year ago --- # Guides | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/guides.md) . [Clearing cache](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache) [Furniture shop](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop) [BetonQuest Dialogue](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue) [Languages](https://tooltips.gitbook.io/tooltips/plugin/guides/languages) [Manual width](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width) [PreviousFAQ](https://tooltips.gitbook.io/tooltips/plugin/faq) [NextClearing cache](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache) --- # FAQ | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/faq.md) . **Which plugins does Tooltips support?** [Supported Plugins](https://tooltips.gitbook.io/tooltips/extra/integrations) page **Which versions does Tooltips support?** All versions 1.18+. Best works with the latest versions. #### [](https://tooltips.gitbook.io/tooltips/plugin/faq#how-do-i-show-tooltips-based-on-conditions) How do I show tooltips based on conditions? To show tooltips based on conditions, you must use [presets](https://tooltips.gitbook.io/tooltips/configuration/preset) . **How do I send tooltips to a player using a command?** Refer to the [Commands](https://tooltips.gitbook.io/tooltips/plugin/commands) page. **Note that the command is only used for testing.** **How do I configure my own theme, icon or preset?** [Theme](https://tooltips.gitbook.io/tooltips/configuration/theme) , [Icon](https://tooltips.gitbook.io/tooltips/configuration/icon) and [Preset](https://tooltips.gitbook.io/tooltips/configuration/preset) pages should be of help. **My characters look like**  If you're using an unsupported language, try following the [Supporting other languages](https://tooltips.gitbook.io/tooltips/plugin/guides/languages) guide. Otherwise you might be using an unsupported amount of lines. **How do I add support for other languages?** \-> Follow the [Supporting other languages](https://tooltips.gitbook.io/tooltips/plugin/guides/languages) guide **My text is offset when using other languages** ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FX5qtFDJ2SiDbCTRsg4Nd%252Fimage.png%3Falt%3Dmedia%26token%3Dc59ad2d4-3fb3-426b-9e56-29d7d059c322&width=768&dpr=3&quality=100&sign=cfeba460&sv=2) \-> Follow the [Manual width](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width) guide [PreviousCommands](https://tooltips.gitbook.io/tooltips/plugin/commands) [NextGuides](https://tooltips.gitbook.io/tooltips/plugin/guides) Last updated 1 year ago --- # Theme textures | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures.md) . Themes are used to define **how** a tooltip looks. They're an essential building component and as such are required for everything else to work. It all starts with the themes texture, which looks like this: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FUP8qGAYGnpgMcwCf06dA%252Fimage.png%3Falt%3Dmedia%26token%3D6dd611ef-2236-4a13-9860-89d223bab271&width=768&dpr=3&quality=100&sign=abacb9ad&sv=2) Aseprite -software is recommended when working with textures Tooltips consist of three parts; left, center and right. You can see all of them in the texture example above. The width of the texture is 6 pixels, which when divided by 3 (for all three parts) equates to 2 pixels per part. So the main rule when making custom themes, is to make their **size divisible by three**. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FGp8uW9I3KjyVSEntGoD0%252Fimage.png%3Falt%3Dmedia%26token%3Da04bb35c-bca2-4ccb-b0f0-f49c8bd645e1&width=768&dpr=3&quality=100&sign=30ae42dd&sv=2) This is how the plugin will split the texture For example, it is possible to make a wider and more detailed tooltip by setting the width to 12, so we have 4 pixels to work with: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FHl5DXmmqlK1p9aV0XeBl%252Fimage.png%3Falt%3Dmedia%26token%3Ddd5c3074-35da-458c-8b22-ac761838fc13&width=768&dpr=3&quality=100&sign=53664254&sv=2) With that much space, we can create more complex shapes for the borders. Here's an example: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FBJSmrkbRJ6VgK5ajb4zy%252Fimage.png%3Falt%3Dmedia%26token%3D9417a6a9-9c3d-4be2-8488-80ceb2b52c96&width=768&dpr=3&quality=100&sign=5e768801&sv=2) Width: 12, height: 20 ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F3uu9KwnctJNDAXNw6xzL%252Fimage.png%3Falt%3Dmedia%26token%3D5b56b4ea-8d7f-457e-8274-0a43f3c37cbe&width=768&dpr=3&quality=100&sign=3a3f060e&sv=2) [PreviousTheme](https://tooltips.gitbook.io/tooltips/configuration/theme) [NextMaking a custom theme](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme) Last updated 1 year ago --- # Clearing cache | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache.md) . This guide is only useful if you configured Tooltips to copy its resource pack into Nexo or ItemsAdder In order to avoid deleting important files, Tooltips does not attempt to remove files it no longer needs inside folder of other plugins. This is why after you've completed configuring Tooltips its recommended to clear the old files of Tooltips inside Oraxen / ItemsAdder's packs. 1. Find the resource pack location * For Nexo its `plugins/Nexo/pack/assets` * For ItemsAdder its `plugins/ItemsAdder/contents` 2. Delete `tooltips` folder, that should be inside the resource pack location 3. Regenerate the resource pack using `/tt reload` 4. Reload your resource pack plugin 1. For Nexo its `/nexo reload pack` 2. For ItemsAdder its `/iazip` 5. Done! [PreviousGuides](https://tooltips.gitbook.io/tooltips/plugin/guides) [NextFurniture shop](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop) Last updated 1 year ago --- # Making a custom theme | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme.md) . Let's create a theme that will support 3 text lines, with fancy borders like so: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FG1cdF50zNzoFD8aezdbN%252Fimage.png%3Falt%3Dmedia%26token%3D74312164-d635-4f4f-8e07-f72589334f49&width=768&dpr=3&quality=100&sign=9db91709&sv=2) ### [](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme#id-1.-find-the-template-texture) 1\. Find the template texture First, open up your pixel art software. I personally recommend Aseprite, but Photoshop or other programs can also be used with proper configuration. Important thing is, that it should be good for pixel art. Next, find the default tooltip textures. They're located in: * `plugins/Tooltips/pack/assets/tooltips/textures/tooltips/default` * or [on GitHub here](https://github.com/Septicuss/tooltips/tree/master/src/main/resources/default/pack/assets/tooltips/textures/tooltips/default) . Since we want 3 lines, we'll use the `default-three-lines.png`. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fa79DNfX9kZQQsuj2VOJp%252Fimage.png%3Falt%3Dmedia%26token%3D7461093e-5d3f-49df-88a3-ffe090a97d37&width=768&dpr=3&quality=100&sign=a13503e7&sv=2) 6x38 pixel default three lines ### [](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme#id-2.-editing-the-texture) 2\. Editing the texture **Note that a theme texture is split into 3 equal parts**: * LEFT * MIDDLE * RIGHT Which means that if your texture is 12 in width, each part will be 4 pixels: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fr9kqOHZadwBnH2ctJyIw%252Fimage.png%3Falt%3Dmedia%26token%3D0232175e-6dc4-4ac1-a5ae-efabe228bc60&width=300&dpr=3&quality=100&sign=d3cf1303&sv=2) **(AS SUCH, YOUR WIDTH HAS TO ALWAYS BE A MULTIPLE OF 3)** Now to make it our own, let's stretch it out so we have some room to work with (setting canvas width to 12) ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FmGNBBvpZOTLWOHiqOtQ2%252Fimage.png%3Falt%3Dmedia%26token%3Da1e48992-6487-407c-9872-0519b3f2eb36&width=768&dpr=3&quality=100&sign=4df3c8b7&sv=2) 12x38 pixels Now expanding the texture itself: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fop6ht0P7dJGnLuTShrV2%252Fimage.png%3Falt%3Dmedia%26token%3D7b1f40b2-d494-467b-aa13-b1536c31d91d&width=768&dpr=3&quality=100&sign=c47a319&sv=2) 12x38, filled up Change the corners to your liking: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fl4q92Jb97APITakDpdzP%252Fimage.png%3Falt%3Dmedia%26token%3De1d1feb9-1e60-4fc2-a5e6-2832505e2fdd&width=768&dpr=3&quality=100&sign=41edc44b&sv=2) And change the color: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FR9WvWnC2V4IWqGpnHHTp%252Fimage.png%3Falt%3Dmedia%26token%3De5d5f597-c6a1-4ff2-a7e1-eeaf29d0ffbb&width=768&dpr=3&quality=100&sign=215d1695&sv=2) Now our texture is done! ### [](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme#id-3.-configuration) 3\. Configuration Now what's left is to configure the theme. #### [](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme#id-1.-add-texture-to-plugin) 1\. Add texture to plugin Save the modified template texture into `plugins/Tooltips/pack/assets/tooltips/textures/tooltips/custom` as `custom.png` ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F4Tdci4UL743lImPxX59s%252Fimage.png%3Falt%3Dmedia%26token%3D5a88540a-69fe-42e3-8192-4f8e8492d7de&width=768&dpr=3&quality=100&sign=5a50bc08&sv=2) #### [](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme#id-2.-configure-theme) 2\. Configure theme Go into any theme `.yml` file (or create your own) inside `plugins/Tooltips/themes`. I will use `plugins/Tooltips/themes/custom.yml`. Now, copy the configuration [of the template from here](https://github.com/Septicuss/tooltips/blob/master/src/main/resources/default/config/themes/themes.yml) . Since we used `default-three-line` as the template, we'll also take `default-three-line` configuration: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FOlRtlr7EIQrTwg46sY8z%252Fimage.png%3Falt%3Dmedia%26token%3Defb73796-b142-421b-b636-38d96f00a0ce&width=768&dpr=3&quality=100&sign=c36f34f6&sv=2) Paste it into your theme file: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fh8mdkaGz0CZCavOth6HP%252Fimage.png%3Falt%3Dmedia%26token%3Dbb0f942f-1cd0-4240-b897-d20b09431602&width=768&dpr=3&quality=100&sign=78756d26&sv=2) Now edit the ID to your liking (don't leave it as `default-three-line`, because that already exists). ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FDo8p41eheyCyrtUcxjfT%252Fimage.png%3Falt%3Dmedia%26token%3D2d3e3113-1c65-4737-a686-d266413e6e79&width=768&dpr=3&quality=100&sign=94d83efe&sv=2) Edit the path to match the path where you put the texture. We put it into * `.../assets/tooltips/textures/tooltips/custom/``custom.png` So the path is * `tooltips:tooltips/custom/``custom.png` And lastly, edit the height to 19, because we changed the width. If not changed, it will look like this: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FMQBTqjxtLp4XSz8VD8ok%252Fimage.png%3Falt%3Dmedia%26token%3De006b178-8dc4-42a6-8f36-4e2f3a25cba2&width=768&dpr=3&quality=100&sign=a631016c&sv=2) Here's the complete configuration: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FL6ePaDg4eiViMAGaXPni%252Fimage.png%3Falt%3Dmedia%26token%3D063c41ba-f8bb-4e0e-b5f3-ad162c9f0473&width=768&dpr=3&quality=100&sign=9c36bc29&sv=2) Once done, update your resource pack and test the theme with * `/tt sendtheme [PLAYER] custom Text` Download the texture done in this page here: 187B [custom.png](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2Fm1iQYTRpzhL0VyIn8mVW%2Fcustom.png?alt=media&token=414276e2-4af7-430e-b2bc-532fb5ff27b8) image Download[Open](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2Fm1iQYTRpzhL0VyIn8mVW%2Fcustom.png?alt=media&token=414276e2-4af7-430e-b2bc-532fb5ff27b8) [PreviousTheme textures](https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures) [NextIcon](https://tooltips.gitbook.io/tooltips/configuration/icon) Last updated 1 year ago --- # Manual width | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width.md) . Unfortunately, not everything is perfect. While working on this plugin, I spent well more than two weeks experimenting and puzzling with width calculation. Width calculation is needed, so that we can know the width of a text line in order to start a new line at the correct position: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FwQnQf4rzBoFsC49FLENb%252Fimage.png%3Falt%3Dmedia%26token%3D2e16f9bd-f87c-4684-9ad8-102cc00fd8bb&width=768&dpr=3&quality=100&sign=a8fedb7c&sv=2) All widths are correct I've figured out how to calculate it correctly for the default symbols, but legacy symbols are not so easy. Having spent countless of hours on it, I suppose there either isn't a straightforward solution or I'm just too dumb to figure it out. Either way, the situation is that some characters have wrong widths, which can cause the new lines to be offset like so: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F3hO9Zn3MayWk98usLjXu%252Fimage.png%3Falt%3Dmedia%26token%3D30c18769-ffdb-4b40-b2eb-2831fc540b31&width=768&dpr=3&quality=100&sign=fe6bf749&sv=2) Notice how the background is smaller than it needs to be and new lines 'a' is offset In order for users to be able to fix that, I added a file where you can manually insert widths for characters. It's located in `plugins/Tooltips/.data/widths.yml` and looks somewhat like this: Copy # Optional file, which allows you to specify the pixel widths of unicodes # Note that pixels in this file can be of decimal format (1.25, 4.5 etc..) # This helps the plugin in width calculation '!': 2 `: 2 a: 3 b: 3 c: 3 d: 3 e: 3 f: 3 g: 3 h: 3 i: 3 j: 3 k: 3 l: 3 m: 3 n: 3 o: 3 In this file, you insert a character followed by the amount of decimal pixels, which will define it's width. Let's say we want to fix the `ᄚ` character. Best way to check if the character is broken, is to paste it a lot of times and check with `/tt sendpreset default PLAYER ᄚᄚᄚᄚᄚᄚ\na` . With that, you can see that the last `a` character becomes offset: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fcnr77O2qhzfyuwQNjKWI%252Fimage.png%3Falt%3Dmedia%26token%3Df5ecc544-ea64-41e2-85ef-b79d25ef2460&width=768&dpr=3&quality=100&sign=10b508db&sv=2) To fix that, in the widths.yml file define its width like so: Copy ᄚ: 2 After which, you can do /tt reload and try the same command again: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FCr6PD0IYrVdBR6wXyZWo%252Fimage.png%3Falt%3Dmedia%26token%3D498e06af-22ca-41ef-8068-1663591adfd6&width=768&dpr=3&quality=100&sign=4a55380e&sv=2) As you can see, tha `a` is now aligned properly. ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width#how-many-pixels) How many pixels? If you test the character, and your `a` goes to the right, it means that the current width is too small, so you have to try something bigger: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F6r0c7f8Gj4epcOjrOJ84%252Fimage.png%3Falt%3Dmedia%26token%3D16a08af9-cd58-45a5-9ad4-a74a30850b18&width=768&dpr=3&quality=100&sign=163ec828&sv=2) If `a` goes to the left, it means your width is too big: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FvTsyZ8yBiFJnyIIPToAO%252Fimage.png%3Falt%3Dmedia%26token%3D2f50c38a-214f-492d-8ff4-ecf64dc01f59&width=768&dpr=3&quality=100&sign=5fe02d76&sv=2) It's about experimentation. Try random values until you find one that aligns the `a` perfectly. You can test it easily by just editing & saving the `widths.yml` file and then reloading. [PreviousLanguages](https://tooltips.gitbook.io/tooltips/plugin/guides/languages) [NextTheme](https://tooltips.gitbook.io/tooltips/configuration/theme) Last updated 1 year ago --- # Furniture shop | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop.md) . 1 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop#download-required-plugins-and-extensions) Download required plugins and extensions * [PlaceholderAPI](https://www.spigotmc.org/resources/6245) * [Vault](https://www.spigotmc.org/resources/34315) * Economy plugin (like [Essentials](https://www.spigotmc.org/resources/essentialsx.9089/) ) * [Vault placeholder expansion](https://api.extendedclip.com/expansions/vault/) (used to check the balance) * Note that this is an expansion, easiest way to install it is running: `/papi ecloud download Vault` and `/papi reload` * [WorldGuard](https://dev.bukkit.org/projects/worldguard/files) (**Optional**, used to limit where furniture is sold) 2 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop#add-shop-presets) Add shop presets Now that all plugins are setup, **download** `shop.yml` and **put** it into `plugins/Tooltips/presets`. 3KB [shop.yml](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2FOU9eUnFmh44FEOAy5tz5%2Fshop.yml?alt=media&token=95375f5a-1bfc-46d2-8058-f1b9aec6b28e) Download[Open](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2FOU9eUnFmh44FEOAy5tz5%2Fshop.yml?alt=media&token=95375f5a-1bfc-46d2-8058-f1b9aec6b28e) 3 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop#configure) Configure Open the above `shop.yml` file. There are 2 things that may be edited to fit your setup: 1. Furniture give command 1. **Nexo**: Already setup for Nexo 2. **ItemsAdder**: `iagive %player% $context(furniture.id)` 2. Economy take command 1. **Essentials**: Already setup They can be in the confirmation preset, and have a "EDIT ME" comment above them: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FeorizMpHRjX15cGpXEH4%252Fcarbon%2520%281%29.png%3Falt%3Dmedia%26token%3D630fd474-ea8b-41fc-ba68-a5ecdf310915&width=768&dpr=3&quality=100&sign=295c8644&sv=2) 4 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop#region) Region To limit furniture sale only to a given region, you can use WorldEdit. Remove all the # comments from region conditions: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fv9SquYfvvHhDciFWOD3W%252Fcarbon%2520%283%29.png%3Falt%3Dmedia%26token%3D5696ffbb-960a-40e7-8817-a65e4ce601ca&width=300&dpr=3&quality=100&sign=34ae6cc&sv=2) After that, in data change the shop regions name. This will be the WorldGuard region where you can buy furniture in: ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FbK2YnR29WtM61GYehXHW%252Fcarbon%2520%284%29.png%3Falt%3Dmedia%26token%3Df5aa0e1a-366d-47ac-9ad1-5af7ac6bbaee&width=300&dpr=3&quality=100&sign=a032335f&sv=2) 5 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop#setup-prices) Setup prices At the top of the `shop.yml` file, you can see the data section. This is where you define prices for the furniture. They are added by their ID. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F17CU71pa4t3fKHLofl0Q%252Fcarbon%2520%285%29.png%3Falt%3Dmedia%26token%3Da83e9040-46ce-419a-bad4-4e8576f46516&width=768&dpr=3&quality=100&sign=6666b1ff&sv=2) 6 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop#reload-the-plugin) Reload the plugin Simply run `/tt reload` and it should be ready to go! ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop#issues) Issues If you get any issues, [PreviousClearing cache](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache) [NextBetonQuest Dialogue](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue) Last updated 1 year ago --- # BetonQuest Dialogue | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue.md) . ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FHCs9lH9lbqKAa229NsqY%252Fimage.png%3Falt%3Dmedia%26token%3D92f0abaa-b191-4148-9127-9768d428088a&width=768&dpr=3&quality=100&sign=a7fbce8e&sv=2) 1 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue#configure-betonquest) Configure BetonQuest In order for Tooltips to be able to read BetonQuest dialogues, it has to be set as the `conversationIO`. This can be done in a conversation package: Copy conversations: Beton: quester: "Beton" first: "firstGreeting" interceptor: none # <-- This will allow chat to work conversationIO: tooltips # <-- Like so 2 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue#create-the-necessary-presets) Create the necessary presets Here's a basic setup which supports animations. Put this into `plugins/Tooltips/presets`. The animations have to be defined in the BetonQuest config and must use the MiniMessage format. dialogue.yml Copy speaking: priority: 1 text: - $context(betonquest.npc) - $preprocess($context(betonquest.text)) theme: default/five-line conditions: - betonquest REQUIRED - compare{1=$var(done)} CANCEL actions: right-click: - skip animation-finished: - delay 3 setvar %player% done true done: priority: 2 text: - $context(betonquest.npc) - $static($strip($context(betonquest.text))) - $static($if($context(betonquest.options[length]) > 0, "» $context(betonquest.options[$context(betonquest.selected)])", "")) theme: default/five-line conditions: - betonquest REQUIRED - compare{1=$var(done)} REQUIRED actions: left-click: - nextoption - redisplay right-click: - selectoption $context(betonquest.selected) - delay 6 clearvar %player% done Read more about [BetonQuest integration here](https://tooltips.gitbook.io/tooltips/extra/integrations#betonquest) . 3 ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue#reload) Reload Reload Tooltips using `/tt reload` Reload BetonQuest using `/bq reload` [PreviousFurniture shop](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop) [NextLanguages](https://tooltips.gitbook.io/tooltips/plugin/guides/languages) Last updated 1 year ago --- # Languages | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/plugin/guides/languages.md) . Requires version **1.6+** ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/languages#setup) Setup 1. Download `legacy.zip` 1017KB [legacy.zip](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2FLqNX3BMQxQuLIAMasUyN%2Flegacy.zip?alt=media&token=b903e170-210d-4c94-aa86-6d2c69a6694e) archive Download[Open](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2FLqNX3BMQxQuLIAMasUyN%2Flegacy.zip?alt=media&token=b903e170-210d-4c94-aa86-6d2c69a6694e) 1. Go into `plugins/Tooltips/.data/schemas` 2. Move all the contents of `legacy.zip` into the `schemas` folder What we just did, was add ALL possible unicodes into our schemas. This includes all [CJK characters](https://en.wikipedia.org/wiki/CJK_characters) and many other missing unicodes from the default game. The problem with adding everything, is that the resource packs size has just grown to **5mb+**! Why has the size grown so much? Because each line in Tooltips has to use a separate font to control the vertical height at which it is shown. Each line has to contain every single unicode from the ones we just added. Plus there are a lot of textures for these characters to be shown, which also takes a lot of space. But there is a solution! Your tooltips most of the time do not need ALL the possible characters, which means that we can remove the redundant ones and reduce our resource pack size. ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/languages#removing-extra-fonts) Removing extra fonts First, determine which languages you need. This could be for example just Chinese, Japanese or Korean. Next go [here](https://unifoundry.com/pub/unifont/unifont-15.0.06/unifont-15.0.06.bmp) . As you can see, it's a giant sheet which contains all the unicodes. If you zoom in, on the left you can see the index. ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FObkXV3e3Z57y1Enb8S53%252Fimage.png%3Falt%3Dmedia%26token%3Da477432a-95fd-4a67-916a-beeed1a9db58&width=768&dpr=3&quality=100&sign=dddbecb8&sv=2) Find the start and ending index of the characters you want to be included. For the above image for example, to include accented and cyrillic characters you would need indexes starting at **01** and ending at **05**. After you have the range, go into your `legacy-fonts.yml` which should be located by now in `plugins/Tooltips/.data/schemas`. In there, you can see lots of providers that have names ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252F36l0Z91U0wXfAx8GFcFk%252Fimage.png%3Falt%3Dmedia%26token%3D324ddedc-0068-49fd-ad56-b4021a5df4e3&width=768&dpr=3&quality=100&sign=8a70b182&sv=2) Inside it, select and remove all providers that are not within your needed indexes. For example if we use the above indexes **01** and **05**, I would just need to remove all providers under `unicode_page_05`. After that's done, [clear the cache](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache) and your Tooltips plugin should be able to support other fonts! ### [](https://tooltips.gitbook.io/tooltips/plugin/guides/languages#important) Important! With some languages, there may be issues in the tooltips width (text is offset). In order to fix that, follow the [Manual width guide](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width) . [PreviousBetonQuest Dialogue](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue) [NextManual width](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width) Last updated 1 year ago --- # Icon | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/icon.md) . You cannot use glyphs / images from other plugins. That's why you have to use the plugins built-in icon system. Icons allow you to add your own custom textures into the tooltip text. ### [](https://tooltips.gitbook.io/tooltips/configuration/icon#base-configuration) Base configuration Copy icon-id: path: "tooltips:icon.png" ascent: 2 height: 8 width: 4 # Only use if needed All properties of the icon configuration are required. #### [](https://tooltips.gitbook.io/tooltips/configuration/icon#path) path Path to the texture of this icon inside `.../pack` #### [](https://tooltips.gitbook.io/tooltips/configuration/icon#ascent) ascent Vertical offset of this texture. Bigger number = higher, lower = lower. #### [](https://tooltips.gitbook.io/tooltips/configuration/icon#height) height Size of this texture. Preferably must be the real pixel height of the texture divided by two. ( if the texture is 16 pixels high, the `height` has to preferably be 8) **width** Overriding width, which will manually tell tooltips what it should interpet this icons width to be. ### [](https://tooltips.gitbook.io/tooltips/configuration/icon#usage) Usage Supported in all tooltip related text. Icons can be used by entering their placeholder: Copy {file/icon-id} ### [](https://tooltips.gitbook.io/tooltips/configuration/icon#default-icons) Default icons #### [](https://tooltips.gitbook.io/tooltips/configuration/icon#images) Images A few default icons are included: Copy /tt sendtheme Septicuss default-one-line Default icons -> {default/gem} {default/box} {default/right-click} ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fw4Hmp3GF7U4EoJcYviPH%252Fimage.png%3Falt%3Dmedia%26token%3Ddd0a8139-3eb5-4bdf-9a37-e342360e512d&width=768&dpr=3&quality=100&sign=30274884&sv=2) #### [](https://tooltips.gitbook.io/tooltips/configuration/icon#spaces) Spaces You can also use predefined spaces to move your text around The format is: `{+x}`\- for positive offset and `{-x}` - for negative offset, where `x` is pixels Copy /tt sendtheme Septicuss default-one-line Default icons -> {-16}{default/gem} {default/box} {default/right-click} ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FjHMmpgtBTtd1yMNgNWhd%252Fimage.png%3Falt%3Dmedia%26token%3D456b584c-ed77-4423-9256-913f288a3131&width=768&dpr=3&quality=100&sign=4691d909&sv=2) [PreviousMaking a custom theme](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme) [NextPreset](https://tooltips.gitbook.io/tooltips/configuration/preset) Last updated 1 year ago --- # Conditions | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions.md) . [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#introduction) Introduction ------------------------------------------------------------------------------------------------------- Conditions are defined per [preset](https://tooltips.gitbook.io/tooltips/configuration/preset) and allow to control when a preset is displayed to the player. For a preset to be shown, all of its conditions must be evaluated to true. Copy conditions: # If players game mode is either creative or survival - gamemode {gm=creative, survival} true # If the player is looking at a grass block - lookingatblock {type=grass_block} When conditions are checked, they are checked line by line. The above example would first check if the players gamemode is either creative or survival after which it would check if the player is also looking at a grass block. ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#structure) Structure The structure of a singular condition is really simple. It consists of just two parts; the conditions name and its possible arguments inside of curly brackets ( {} ): Copy condition_name { key: value ; key: value } **All argument types are covered here:** [Argument Types](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) If a condition does not have any required arguments, it can be defined without the curly brackets like so: Copy conditions: - night - day **All conditions are covered here:** [Condition list](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list) [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#outcomes) Outcomes ----------------------------------------------------------------------------------------------- An important part of optimizing conditions, is the ability to stop reading conditions early if some condition is false. For example, all operations that start with "lookingat" are expensive to perform, so it's imperative that they aren't checked often. This can be done using outcomes. Outcomes are optional and defined at the end of a full condition like so: Copy - (outcome) ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#supported-outcomes) Supported outcomes Outcome Description required (or true) The current line must be true. If it isn't, further conditions won't be checked. cancel (or false) If the current line is true, further conditions won't be checked. skip Skips the condition (does not check it), but still writes **context** ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#examples) Examples If we wanted to check if player is looking at furniture inside of a WorldGuard region called "shop", we'd put the region condition first and give it the "required" outcome: Copy conditions: # If players region is "shop" - region { r = shop } required # If player is looking at any type of furniture - lookingatfurniture required This way, the region condition will be performed first and only when it is true, will the "lookingatfurniture" run. [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#context) Context --------------------------------------------------------------------------------------------- Many conditions return context, which contains useful information about the target. For example, a `time` condition may return the current time in ticks or `lookingatfurniture` condition may return the name of the furniture. The context returned by conditions is documented in the [condition list](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list) . Conditions only return context if they are `true` or if the outcome is marked as "`skip`". Context can be used with the [`$context(key)`](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdcontext-key) function. [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#composite-conditions) Composite conditions ----------------------------------------------------------------------------------------------------------------------- Composite conditions allow you to do more complex logical checks in a single line using operators. ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#supported-operators) Supported operators Operator Description AND ( also && ) Left and right part must both be true OR ( also || ) Left or right part must be true ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions#examples-1) Examples Copy conditions: # If the region is shop AND players gamemode is creative - region { r = shop } AND gamemode { gm = creative } true # If player is looking at any type of furniture or at any type of entity - lookingatfurniture || lookingatentity Even more extreme example, when operators are combined with parenthesis: Copy conditions: # (If the region is shop) AND ( (player is either looking at a coach) OR (is in creative) ) - ( region {r = shop } ) AND (lookingatfurniture { id = coach } OR gamemode { gm = creative } ) [PreviousPreset](https://tooltips.gitbook.io/tooltips/configuration/preset) [NextCondition list](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list) Last updated 1 year ago --- # Commands | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands.md) . Actions support some custom commands. Note that these are not actual commands that can be executed in chat and they only work inside actions. [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#commands) Commands ----------------------------------------------------------------------------------------------------- Regular * [**sound**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#sound) - send a sound to a player * [**message**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#message) \- send a message to a player * [**delay**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#delay) - send multiple commands to player after a delay **Variables** * [**setvar**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#setvar) - set a global or player variable * [**setpersistentvar**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#setpersistentvar) - set a global or player persistent variable * [**clearvar**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearvar) - clear a global or player variable * [**clearpersistentvar**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearpersistentvar) - clear a global or player persistent variable * [**clearvars**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearvars) - clear all global or player variables * [**clearpersistentvars**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearpersistentvars) - clear all global or player persistent variables * [**savepersistentvars**](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#savepersistentvars) \- save all persistent variables to the file #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#animations) Animations * skip - skip animations [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#regular) Regular --------------------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#sound) sound Send a sound to the player viewing the tooltip. > **Arguments** > > 1. sound name > > * used exactly the same way as in the /playsound command. > > * list of vanilla sounds can be found [here](https://www.digminecraft.com/lists/sound_list_pc.php) > > > 2. sound category > > * used exactly the same way as in the /playsound command. > > * list of sound categories can be found [here](https://www.digminecraft.com/lists/sound_list_pc.php) > (on the right) > > > 3. volume (float) > > 4. pitch (float) > **Examples** Copy actions: on-show: - sound minecraft:block.amethyst_block.break master 1 1 right-click: - sound custom:mysoundname master 1 1 ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#message) message Send a message to the player viewing the tooltip. Supports hex, PAPI placeholders and [local placeholders](https://tooltips.gitbook.io/tooltips/extra/local-placeholders) . > **Arguments** > > Message **Examples** Copy actions: on-show: - message Welcome traveller! left-click: - message &cOuch! ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#delay) delay Send an array of commands to the player viewing the tooltip after a specific given delay. Commands are separated with a `;` and support both local commands (on this page) and outside commands. Supports all placeholders. > **Arguments** > > Time (ticks, 1 second = 20 minecraft ticks) > > Commands (separated with a ; ) **Examples** Copy actions: on-stop-showing: # After 1 second, message hello and kill the player - delay 20 message Hello!; kill %player% # After 5 seconds, set variable meow to false - delay 100 setvar player meow false [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#variables) Variables ------------------------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#setvar) setvar Set a [non-persistent](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) variable for the given [player or globally](https://tooltips.gitbook.io/tooltips/extra/variables#scope) . Supports PAPI placeholders and [local placeholders](https://tooltips.gitbook.io/tooltips/extra/local-placeholders) . > **Arguments** > > [Scope](https://tooltips.gitbook.io/tooltips/extra/variables#scope) > \[ player / global / insert players name \] > > Variable name (supports placeholders) > > Value ([supports mathematical evaluation](https://tooltips.gitbook.io/tooltips/extra/variables#evaluation) > ) **Examples** Copy actions: on-stop-showing: # Scope here is global, # variable name is meow # and value is 1 - setvar global meow 1 ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#setpersistentvar) setpersistentvar Set a [persistent](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) variable for the given player or globally. Supports PAPI placeholders and [local placeholders](https://tooltips.gitbook.io/tooltips/extra/local-placeholders) . > **Arguments** > > Scope \[ player / global / insert players name \] > > Variable name (supports placeholders) > > Value (supports mathematical evaluation) **Examples** Copy actions: on-stop-showing: # Add 1 for each time the player looks at this tooltip - setpersistentvar player looked %persistentvar_looked% + 1 ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearvar) clearvar Clear a [non-persistent](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) variable for the given player or globally. Supports PAPI placeholders and [local placeholders](https://tooltips.gitbook.io/tooltips/extra/local-placeholders) . > **Arguments** > > [Scope](https://tooltips.gitbook.io/tooltips/extra/variables#scope) > \[ player / global / insert players name \] > > Variable name (supports placeholders) **Examples** Copy actions: on-stop-showing: # Clears the "meow" variable, effectively removing it - clearvar player meow ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearpersistentvar) clearpersistentvar Clear a [persistent](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) variable for the given player or globally. Supports PAPI placeholders and [local placeholders](https://tooltips.gitbook.io/tooltips/extra/local-placeholders) . > **Arguments** > > [Scope](https://tooltips.gitbook.io/tooltips/extra/variables#scope) > \[ player / global / insert players name \] > > Variable name (supports placeholders) **Examples** Copy actions: on-stop-showing: # Clears the "meow" variable, effectively removing it - clearpersistentvar player looked ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearvars) clearvars Clear all [non-persistent](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) variables for either a given player or globally. > **Arguments** > > [Scope](https://tooltips.gitbook.io/tooltips/extra/variables#scope) > \[ player / global / insert players name \] **Examples** Copy actions: on-stop-showing: # Clear all global variables - clearvars global # Clear all players variables - clearvars player ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#clearpersistentvars) clearpersistentvars Clear all [persistent](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) variables for either a given player or globally. > **Arguments** > > [Scope](https://tooltips.gitbook.io/tooltips/extra/variables#scope) > \[ player / global / insert players name \] **Examples** Copy actions: on-stop-showing: # Clear all persistent global variables - clearpersistentvars global # Clear all persistent players variables - clearpersistentvars player ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#savepersistentvars) savepersistentvars Save all [persistent](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) variables. **Examples** Copy actions: on-stop-showing: - savepersistentvars [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#animations-1) Animations ----------------------------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#skip) skip Skips animations depending on given arguments. **Note that the animations have to have an ID to be able to be skipped**. > **Arguments** > > Skipped \[ current / all \] #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands#examples) Examples Copy actions: left-click: # Skips the current running animation - skip current # Skips ALL animations in the preset - skip all [PreviousActions](https://tooltips.gitbook.io/tooltips/configuration/preset/actions) [NextFunctions](https://tooltips.gitbook.io/tooltips/configuration/preset/functions) Last updated 1 year ago --- # Actions | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/actions.md) . Actions allow players to interact with tooltips. When any type of tooltip is currently being shown using presets conditions, you are able to listen to actions and execute commands. [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions#action-configuration) Action configuration -------------------------------------------------------------------------------------------------------------------- Copy preset-id: content: text: - 'Looking at bedrock' display: theme: default-one-line conditions: conditions: - lookingatblock{type=bedrock} true # Actions are specified optionally here actions: # Action name and list of commands right-click-block: # A single "say hi" command that will be executed by the console - say hi ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FZZblQ8QgK3NLmZWlgxtZ%252Fimage.png%3Falt%3Dmedia%26token%3D048c7208-e239-46f6-9342-25259c3d5829&width=768&dpr=3&quality=100&sign=57f625da&sv=2) right-click-block action executes the "say hi" command in console ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions#supported-actions) Supported actions Action Description left-click Any type of left click left-click-air Left click air left-click-block Left click a block left-click-entity Left click an entity right-click Any type of right click right-click-air Right click air (only works with an item in hand, blame Spigot) right-click-block Right click a block right-click-entity Right click an entity on-show Triggered when a tooltip is first triggered on-stop-showing Triggered when a tooltip stops being shown animation-finished Triggered when all animations are done ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions#commands) Commands All commands support both PAPI and local placeholders, as well as a backup built-in %player% placeholder for the players username. This plugin provides some custom commands for convenience. Read more about them here: [Commands](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands) ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/actions#examples) Examples Copy actions: # All right and left clicks will make the console say hi left-click: - say hi right-click: - say hi [PreviousShow](https://tooltips.gitbook.io/tooltips/configuration/preset/show) [NextCommands](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands) Last updated 1 year ago --- # Condition list | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list.md) . [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#contents) Contents --------------------------------------------------------------------------------------------------- Currently, the plugin natively supports the following conditions: * [compare](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#compare) \[ Compare two values \] * [permission](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#permission) \[ Whether a player has specified permissions \] * [op](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#op) \[ Whether a player is opped \] * [gamemode](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#gamemode) \[ Whether the players gamemode is among specified ones \] * [location](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#location) \[ Whether the players location matches the given location \] * [incuboid](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#incuboid) \[ Whether a player is in a cuboid \] * [standingon](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#standingon) \[ Which type of block the player is standing on \] * [sneaking](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#sneaking) \[ Whether the player is sneaking \] * [world](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#world) \[ Which world the player is in \] * [day](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#day) \[ Whether its day in the players world \] * [night](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#night) \[ Whether its night in the players world \] * [time](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#time) \[ What time is it in the players world \] * [lookingatblock](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatblock) \[ What type of block the player is looking at \] * [lookingatfurniture](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatfurniture) \[ If player is looking at plugin furniture \] **\*1** * [lookingatentity](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatentity) \[ If player is looking at an entity \] * [entitynbtequals](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#entitynbtequals) \[ Check nbt values of the entity that is being looked at \] **\*2** * [tileentitynbtequals](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#tileentitynbtequals) \[ Check nbt values of the tile entity that is being looked at \] **\*2** * [blocknbtequals](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#blocknbtequals) \[ Check nbt values of the block that is being looked at \] **\*2** * [blockstateequals](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#blockstateequals) \[ Check blockstate values of the block that is being looked at \] * [lookingatcitizen](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatcitizen) \[ Whether player is looking at a Citizens NPC \] **\*4** * [lookingatmythicmob](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatmythicmob) \[Whether player is looking at a MythicMob mob\] **\*5** * [equipped](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#equipped) \[ If a player has the item equipped in hands or on body \] * [itemnbtequals](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#itemnbtequals) \[ If players equipped item has given nbt data \] **\*2** * [region](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#region) \[ If players region is among specified ones \] **\*3** **Notes**: 1. Requires a supported [furniture plugin](https://tooltips.gitbook.io/tooltips/extra/integrations#supported-furniture-plugins) 2. Requires [NBT API](https://www.spigotmc.org/resources/7939) plugin 3. Requires a [region plugin](https://tooltips.gitbook.io/tooltips/extra/integrations#supported-region-plugins) 4. Requires [Citizens](https://www.spigotmc.org/resources/13811) 5. Requires [MythicMobs](https://mythiccraft.io/index.php?resources/mythicmobs.1/) [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#conditions) Conditions ------------------------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#compare) compare Argument Type Example 1, first [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) (supports placeholders) %player\_name% 2, second [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) (supports placeholders) %player\_health% o, oper, operation `(optional)` [Operation](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) Context Description compare.first Parsed value of the "first" argument compare.second Parsed value of the "second" argument #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description) Description > If only first is set and it's a boolean, will check if it's true > > If both first and second are set and they are strings, they will be compared if they are equal. If they are booleans (true / false) they will be also compared if they are equal. > > If operation is set and both first & second arguments are numbers, will use the operation to compare the variables. **Examples** Copy conditions: # Check if players health is more than or equal to 20.0 - compare { first = %player_health%; operation = >=; second= 20.0 } # Check if both are equal (they aren't) - compare { 1=true; 2=false } # Check if players name is Septicuss - compare { 1=%player_name%; 2=Septicuss } ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#permission) permission Argument Type Example p, perm, permission [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) array tooltips.command.reload #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-1) Description > Checks if player has any of the permissions in the string array **Examples** Copy conditions: # Check if player has the permission to a command - permission { p = tooltips.command.reload } # Check if player has either of the two permissions - permission { perm = first, second } ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#op) op #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-2) Description > Checks if player is opped **Examples** Copy conditions: - op ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#gamemode) gamemode Argument Type Example gamemode, gm [Type](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) of [gamemode](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/GameMode.html) array creative, survival #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-3) Description > Checks if player has any of the given gamemodes **Examples** Copy conditions: # Check if players game mode is adventure - gamemode { gm = adventure } # Check if players game mode is either creative or survival - gamemode { gamemode = creative, survival } ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#location) location Argument Type Example location, loc, l Array of [Location](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) \[ 22, 602, -234\] or \[22, 602, -234\], \[22, 603, -233\] #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-4) Description > Checks if player is at the given coordinates in their current world **Examples** Copy conditions: # Check if the current location is x,y,z = 22, 602, -234 - location { l = [ 22, 602, -234 ] # Check if the current location is either 22 602 -234 or 22 603 -233 - location { l = [ 22, 602, -234], [ 22, 603, -233] } ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#incuboid) incuboid Argument Type Example first, 1, firstpoint [Location](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) \[ 22, 602, -234\] second, 2, secondpoint [Location](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) \[49, 620, -251\] #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-5) Description > **This check is more resource-intensive than the "region" condition, due to being unable to cache which cuboid the player is currently in.** > > Checks if player is within the two given locations. **Examples** Copy conditions: # Check if player is within location at 22, 602, -234 and 49, 620, -251 - incuboid { first = [ 22, 602, -234 ]; second = [49, 620, -251] } ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#standingon) standingon Argument Type Example type, m, mat, material [Type](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) of [material](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html) array grass\_block, obsidian #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-6) Description > Checks if player is currently standing on any of the given materials. Can also be air to check if the block under the player is air. **Examples** Copy conditions: # Check if player is standing on grass or dirt blocks - standingon { type = grass_block, dirt } # Check if player is standing on a block of obsidian - standingon { m = obsidian } ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#sneaking) sneaking #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-7) Description > Checks if player is currently sneaking **Examples** Copy conditions: # Check if player is sneaking - sneaking ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#world) world Argument Type Example name [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) array world, resource\_world Context Description world Returns the world name #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-8) Description > Checks if players world is any of the ones defined in the name string array. **Examples** Copy conditions: # Check if player is in the world called "world" - world { name = world } # Check if player is either in the nether or the end worlds - world { name = world_nether, world_the_end } ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#day) day #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-9) Description > Checks if its day (time between 0 and 13000) in the players current world. **Examples** Copy conditions: # Check if its day in the players current world - day ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#night) night #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-10) Description > Checks if its night (time between 13000 and 24000) in the players current world. **Examples** Copy conditions: # Check if its night in the players current world - night ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#time) time Argument Type Example time, t [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 1000, 13000 o, oper, operation (optional) [Operation](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) \>= #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-11) Description > Checks if the current [time](https://minecraft.fandom.com/wiki/Daylight_cycle) > in the players world is equal to the given time argument. > > If operation is included, a comparison operation is conducted, with given time argument being the first comparable. **Examples** Copy conditions: # Checks if the time in the players current world is greater than or equal to 1000 - time { time = 1000; oper = >= } # Checks if the time in the players current world is between 0 and 5000 inclusive - time {t=0; oper=>=} AND time {t=5000; oper=<=} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatblock) lookingatblock Argument Type Example type, m, mat, material (optional) [Type](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) of [material](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html) array bedrock, grass\_block location, loc, l (optional) Array of [Location](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) \[0, 64, 50\] distance, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-12) Description > If no type or location is given, will return true if any type of block is being looked at. > > If type is defined, will check if the block that is being looked at is of specific material > > If location is defined, will check if the block that is being looked at is at specific coordinates in the players current world > > If distance is defined (3 by default), will increase or decrease the distance at which the block that is being looked at is detected **Examples** Copy conditions: # Check if player is looking at bedrock - lookingatblock{type=bedrock} # Check if player is looking at an acacia sign at given coordinates - lookingatblock{l=[440,65,803]; m=acacia_sign} # Check if player is looking at blocks in given three coordinates - lookingatblock{l=[440,65,803],[441,65,808],[442,65,803]} # Check if player is looking at an acacia sign at given coordinates with increased distance - lookingatblock{l=[440,65,803]; m=acacia_sign; d=6} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatfurniture) lookingatfurniture Argument Type Example id (optional) [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) array couch, chair distance, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 Context Description furniture.id ID of target furniture furniture.name Name of the furniture as defined in the config of the plugin furniture.plugin The plugin where this furniture came from #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-13) Description > Requires any supported furniture plugin to work. > > If no ids are given, checks if player is looking at any furniture within the distance (3 by default). > > If ids are given, checks if the furniture the player is looking at has any of the ids. > > Distance argument increases the distance at which furniture is checked. **Examples** Copy conditions: # Checks if player is looking at any type of furniture - lookingatfurniture # Checks if player is looking at a furniture with id of couch or chair - lookingatfurniture {id=couch, chair} # Previous but with a distance of 6 - lookingatfurniture {id=lamp; distance=6} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatentity) lookingatentity Argument Type Example entity, type, t (optional) Type of [entity type](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html) array villager, sheep distance, dist, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-14) Description > If no types are given, checks if player is looking at any type of entity (armor stands etc. too) > > If types are given, checks if player is looking at any of the given entity types > > If distance is given, will increase the distance that entities are checked at (3 by default) **Examples** Copy conditions: # Player is looking at a villager - lookingatentity {t=villager} # Player is looking at a cow or a pig - lookingatentity {entity=cow,pig} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#entitynbtequals) entitynbtequals Argument Type Example key, k [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) mynbtkey nbtvalue, nbtval, value, val, v [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) , [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) or [Boolean](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) weird, 10, false distance, dist, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-15) Description > Requires NBT API plugin to work. > > Checks if the targeted entity within distance (3 by default) has a key with given value > > Supports basic NBT paths as key. Example: `Item.tag.CustomModelData` **Examples** Copy conditions: # Checks if integer at "mynbtkey" equals 10 - entitynbtequals {key=mynbtkey; value=10} # Checks if boolean at "mynbtkey" equals false - entitynbtequals {key=mynbtkey; value=false} # .. same for string as the value ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#tileentitynbtequals) tileentitynbtequals Argument Type Example key, k [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) mynbtkey nbtvalue, nbtval, value, val, v [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) , [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) or [Boolean](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) weird, 10, false distance, dist, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-16) Description > Requires NBT API plugin to work. > > Checks if the targeted tile entity within distance (3 by default) has a key with given value > > Supports basic NBT paths as key. Example: `Item.tag.CustomModelData` **Examples** Copy conditions: # Checks if a (block) player skull owner is Septicuss - lookingatblock{type=player_head} - tileentitynbtequals{key=SkullOwner.Name; value=Septicuss} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#blocknbtequals) blocknbtequals Argument Type Example key, k [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) mynbtkey nbtvalue, nbtval, value, val, v [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) , [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) or [Boolean](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) weird, 10, false distance, dist, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-17) Description > Requires NBT API plugin to work. > > Checks if the targeted block within distance (3 by default) has a key with given value > > Supports basic NBT paths as key. Example: `Item.tag.CustomModelData` **Examples** Copy conditions: # Checks if the target block has a key 'hello' with value true - blocknbtequals{key=hello; value=true} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#blockstateequals) blockstateequals Argument Type Example key, k, id [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) note, powered value, val, v [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) , [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) or [Boolean](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) weird, 10, false distance, dist, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-18) Description > Checks if the targeted blocks [block state](https://minecraft.fandom.com/wiki/Block_states) > within distance (3 by default) has a key with given value **Examples** Copy conditions: - lookingatblock{type=note_block} # Optional # Check if the note blocks "powered" state is equal to "false" - blockstateequals{key=powered; val=false} # Check if the note blocks "note" is equal to 15 - blockstateequals{key=note; value=15} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatcitizen) lookingatcitizen Argument Type Example id, name (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) array 0, 1, 5, 23 distance, dist, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-19) Description > Requires Citizens plugin to work. > > Checks if the targeted entity within distance (3 by default) is a Citizens NPC. > > If ids are present, checks if the targeted NPC has any of the given ids. > > Citizen ids can be seen by first selecting an NPC using commands and typing /npc:![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FRXJ3JATzWUadNKGLp2PE%252Fimage.png%3Falt%3Dmedia%26token%3D31bc1efe-1fb3-4b43-8b3b-9b1b4923a839&width=300&dpr=3&quality=100&sign=45cfd501&sv=2) **Examples** Copy conditions: # If player is looking at a Citizen with the id 0 - lookingatcitizen{id=0} # If player is looking at a Citizen with either id 2 or 23 - lookingatcitizen{id=2,23} # IF player is looking at a Citizen from 10 blocks away - lookingatcitizen{dist=10} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#lookingatmythicmob) lookingatmythicmob Argument Type Example id, ids (optional) String array john, spider distance, dist, d (optional) [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) 3, 5 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-20) Description > Requires MythicMobs plugin to work. > > Checks if the targeted entity within distance (3 by default) is a MythicMobs mob > > If ids are present, checks if the targeted mythic mob has any of the given ids. **Examples** Copy conditions: # If player is looking at a MythicMob with the id 'my-boss' - lookingatmythicmob{id=my-boss} # If player is looking at a MythicMob with either id 'my-boss' or 'john' - lookingatmythicmob{id=my-boss,john} # If player is looking at any MythicMob from 10 blocks away - lookingatmythicmob{dist=10} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#equipped) equipped Argument Type Example type, m, mat, material [Type](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) of [material](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html) array stone\_axe, flint\_and\_steel slot, s (optional) [Slot](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) hand, helmet #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-21) Description > Checks if item at the given slot (main hand by default) has the given type **Examples** Copy conditions: # If player has a diamond sword in their main hand - equipped { type=diamond_sword } # If player has a compass in their off hand - equipped { s = off_hand; type = compass } # If player has a diamond or gold helmet equipped - equipped {slot=helmet; type=diamond_helmet,gold_helmet} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#itemnbtequals) itemnbtequals Argument Type Example key, k [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) mynbtkey nbtvalue, nbtval, value, val, v [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) , [Integer](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) or [Boolean](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) weird, 10, false slot, s (optional) [Slot](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) off\_hand, legs #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-22) Description > Requires NBT API plugin to work. > > Checks if item at the given slot (main hand by default) has an item with the given nbt key with given nbt value in it. Supports basic NBT paths as keys. Example: `Item.tag.CustomModelData` **Examples** Copy conditions: # Checks if the custom model data nbt tag of the held item is equal to 1 - itemnbtequals { key = CustomModelData; value=1} ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#region) region Argument Type Example r, reg, region, name, id (optional) [String](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) array shop, spawn Context Description region Current region ID #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#description-23) Description > Requires any [region](https://tooltips.gitbook.io/tooltips/extra/integrations#supported-region-plugins) > plugin to work. > > Checks if player is in any of the given region ids > > If no regions are provided, returns true if player is inside of any region **Examples** Copy conditions: # Check if player is in the shop region - region { r = shop } # Check if player is either inside the spawn region or the crates region - region { r = spawn, crates } [PreviousConditions](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions) [NextShow](https://tooltips.gitbook.io/tooltips/configuration/preset/show) Last updated 1 year ago --- # Preset | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset.md) . [](https://tooltips.gitbook.io/tooltips/configuration/preset#configuration) Configuration ---------------------------------------------------------------------------------------------- Presets are configured in the `Tooltips/presets` folder. To create presets, create a new file in the folder as `.yml`. After that, you can start configuring presets in that file. ### [](https://tooltips.gitbook.io/tooltips/configuration/preset#configuration-1) Configuration All of these, except for `theme` are optional. Copy preset-id: priority: 0 text: - 'Test Tooltip' - 'Price: 500{default/gem}' - '(Click to buy)' fade: fadein: 20 stay: 20 fadeout: 20 theme: default/three-line display: color: white horizontal-shift: 0 conditions: - gamemode{gm=creative} true show: reshow: false active: true cooldown: 0 actions: right-click: - 'message Hello!' ### [](https://tooltips.gitbook.io/tooltips/configuration/preset#minimal-configuration) Minimal Configuration Copy preset-id: theme: default-three-line ### [](https://tooltips.gitbook.io/tooltips/configuration/preset#properties) Properties `priority` - Highest priority will appear first Default priority for all presets is 0. Presets with a higher priority will be checked first, this is extremely useful in more complex configurations with multiple presets. #### [](https://tooltips.gitbook.io/tooltips/configuration/preset#text-lines-of-text-that-will-be-displayed) `text` - Lines of text that will be displayed Copy text: - 'Regular text, nothing special' # PlaceholderAPI placeholder supported - '||Centered text||' # Centered text - 'Colored text' # MiniMessage format - 'Sofa price: $data(furniture.sofa.price)$' # Functions - '' # Animations ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FL4Ld6Zw6thxzgieS4Q5l%252Ftext.gif%3Falt%3Dmedia%26token%3D41997fa2-349b-4ec8-bec5-35fb569a3969&width=768&dpr=3&quality=100&sign=f25aafca&sv=2) #### [](https://tooltips.gitbook.io/tooltips/configuration/preset#fade-fade-options-just-like-in-titles) `fade` - Fade options, just like in titles Copy fade: fadein: 20 # 20 ticks = 1 second to fade in stay: 100 # 100 ticks to stay, only necessary with active: false fadeout: 40 # 40 ticks = 2 seconds to fade out ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fw4KqBxh2okHeepHNXu6N%252Ffade.gif%3Falt%3Dmedia%26token%3D24fdf413-a6ec-455f-ae0e-4a090c030482&width=768&dpr=3&quality=100&sign=1d75e610&sv=2) #### [](https://tooltips.gitbook.io/tooltips/configuration/preset#theme-the-visual-theme-used-for-this-preset) `theme` - The visual theme used for this preset Set to the ID of a [Theme](https://tooltips.gitbook.io/tooltips/configuration/theme) . This is required, otherwise preset wouldn't know what to look like. #### [](https://tooltips.gitbook.io/tooltips/configuration/preset#display) `display` Options related to how the tooltip is displayed. > `**color**` **- color of the background** > > You can specify the color the following ways: **Gradients generate a larger JSON message than regular color, so tooltips with gradients that have a large background may be laggier!** Copy color: 'white' color: '#fcba03' color: 'red:green' # gradient from red to green color: '#ffffff:#00ff19' # gradient from #ffffff to #00ff19 color: '#ffffff:#00ff19:#ffffff' # gradient from #ffffff to #00ff19 and to #ffffff again ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FONJYetHlt0a9rvkMjk9j%252Fimage.png%3Falt%3Dmedia%26token%3Dfefe5dcd-eae2-46df-9c25-20e82d2d051a&width=768&dpr=3&quality=100&sign=d5735199&sv=2) color: "#ffffff-#ff0000-#ffffff" > `horizontal-shift` - shift of the tooltip in pixels ![Cover](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FTQQ0RXrxWLOJZslytYRL%252Fimage.png%3Falt%3Dmedia%26token%3De7221667-3aba-4247-b9da-419dc3319fb8&width=490&dpr=3&quality=100&sign=5e50894e&sv=2) horizontal-shift: 10 ![Cover](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252Fl1hq8CwsABiaFKTcrgTd%252Fimage.png%3Falt%3Dmedia%26token%3D125706b3-9502-4771-8e1a-5364cddbc58e&width=490&dpr=3&quality=100&sign=a8350b19&sv=2) horizontal-shift: -10 #### [](https://tooltips.gitbook.io/tooltips/configuration/preset#conditions-a-list-of-conditions) `conditions` - a list of conditions Conditions, which have to be fulfilled in often for this preset to be shown. More about conditions: [Conditions](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions) #### [](https://tooltips.gitbook.io/tooltips/configuration/preset#show-defines-how-this-preset-is-shown) `show` - defines how this preset is shown Presets can be made to be shown once or have a given cooldown. More about show properties: [Show](https://tooltips.gitbook.io/tooltips/configuration/preset/show) #### [](https://tooltips.gitbook.io/tooltips/configuration/preset#actions-commands-tied-to-actions) `actions` - commands tied to actions Think of this as events, once they happen - a list of commands is ran. More about actions: [Actions](https://tooltips.gitbook.io/tooltips/configuration/preset/actions) [](https://tooltips.gitbook.io/tooltips/configuration/preset#other-properties) Other Properties ---------------------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset#file-priority) File Priority You can define a priority for the entire preset file like so: Copy priority: 10 # At the top of the file my-preset: ... my-other-preset: ... This will add the given priority priorities of all presets. For example if `my-presets` priority is 0, it will be 10 with the file priority. This option is useful to make presets of one file more important than of another file. ### [](https://tooltips.gitbook.io/tooltips/configuration/preset#data) Data Data is scoped to a single preset file, and can be used by the `$data(key)` function in presets. This is useful to have predefined data, like furniture prices right in your preset files. You can define any sort of valid yaml data after "`data`". Copy data: # At the top of the file my-own-key: 1 debug: true prices: chair: 100 table: 50 lines: - 'Hello!' - 'My name is %placeholder%' ### [](https://tooltips.gitbook.io/tooltips/configuration/preset#parenting) Parenting Presets support parenting since plugin version 1.5. Parenting allows you to copy all properties from a "parent" preset into another preset and modify only the required properties. Parents and children are defined like so: Copy parent: content: text: - '&cThe parent!' display: theme: default-one-line child: parent: parent child-modified: parent: parent content: text: - '&aThe second child!' Other children can be parented as well. [PreviousIcon](https://tooltips.gitbook.io/tooltips/configuration/icon) [NextConditions](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions) Last updated 1 year ago --- # Variables | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/extra/variables.md) . As a miscellaneous tool, this plugin supports internal variables. These variables can be set inside actions or through a command by admins and then used to check conditions inside tooltips. Variables have a target, persistence and are defined through key-value pairs. For example, you can have a variable named "`meow`" equal to "`true`" or "`amount`" equal to `5`. [](https://tooltips.gitbook.io/tooltips/extra/variables#usage) Usage ------------------------------------------------------------------------- Below is a reference table, which shows where and how variables can be used; _If you want to modify variables, you can do it:_ * Inside tooltips' [actions](https://tooltips.gitbook.io/tooltips/configuration/preset/actions) , using [variable commands](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands) For example: Copy conditions: conditions: # When looking at a bedrock block - lookingatblock{type=bedrock} true actions: right-click: # And right clicking that bedrock block, set players variable "cool" to "true" - setvar %player% cool true * Externally (outside of actions), using the [vars command](https://tooltips.gitbook.io/tooltips/plugin/commands#variable-commands) For example: `/tt vars setvar Septicuss cool true` _If you want to use variables in conditions (to check something)_ * Use the [compare condition](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#compare) with [variable functions](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdvar-global-key-usdpvar-global-key) For example: Copy conditions: conditions: # Check if player has variable "cool" set to true - compare{ first=$var(cool); second=true } _If you want to use variables in tooltips text_ * Use the [variable functions](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdvar-global-key-usdpvar-global-key) For example: Copy content: text: - 'Is the player viewing' - 'this tooltip cool?' - '$var(cool)' _If you want to display variables outside of Tooltips in other plugins_ * Use [PlaceholderAPI variable placeholders](https://tooltips.gitbook.io/tooltips/extra/variables#placeholderapi) For example: `/papi parse Septicuss %tooltips_v_cool%` [](https://tooltips.gitbook.io/tooltips/extra/variables#terminology) Terminology ------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/extra/variables#persistence) Persistence There are persistent and non-persistent variables. Persistence means that variables are saved into files and kept around. Non-persistent variables are reset on server restart, persistent variables can only be cleared through the proper commands. ### [](https://tooltips.gitbook.io/tooltips/extra/variables#scope) Scope Variable commands define a scope, which defines who this variable will be set for. Scope Explanation Global A global variable applied to all players. Player The current player. For example, if this scope is used in actions, the action command will be executed for the player with an active tooltip. An online players name. Using this will set it only for a specific player. [](https://tooltips.gitbook.io/tooltips/extra/variables#evaluation) Evaluation ----------------------------------------------------------------------------------- Setting the variable supports mathematical expressions, which can utilize PAPI placeholders and local placeholders. Examples: Copy setvar player myvariable (1+1) setvar global goofballs $var(global, goofballs) + 1 setvar global goofballs ($var(global, goofballs) / $var(myvariable)) * 30 + 25 /tt setpersistentvar Septicuss personal_number 31*5 [](https://tooltips.gitbook.io/tooltips/extra/variables#placeholderapi) PlaceholderAPI ------------------------------------------------------------------------------------------- Using PlaceholderAPI placeholders has been made as simple as possible. Placeholders are dynamic, and you have to build them using keys: Key Description v variable (always required) g global p persistent #### [](https://tooltips.gitbook.io/tooltips/extra/variables#structure-of-a-placeholder) Structure of a placeholder `%tooltips_[KEY]_[ID]%` \[KEY\] -> multiple keys combined in any order \[ID\] -> ID of the variable being requested #### [](https://tooltips.gitbook.io/tooltips/extra/variables#examples) Examples _Get the player variable "cool"_ `%tooltips_v_cool%` _Get the global variable "cool"_ `%tooltips_gv_cool%` _Get the_ _**persistent**_ _player variable "tutorial\_passed"_ `%tooltips_pv_tutorial_passed%` _Get the_ _**persistent**_ _global variable "views"_ `%tooltips_pgv_views%` [PreviousIntegrations](https://tooltips.gitbook.io/tooltips/extra/integrations) [NextAPI](https://tooltips.gitbook.io/tooltips/extra/api) Last updated 1 year ago --- # API | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/extra/api.md) . [](https://tooltips.gitbook.io/tooltips/extra/api#add-tooltips-to-your-plugin) Add Tooltips to your plugin --------------------------------------------------------------------------------------------------------------- Fill in the `VERSION` with the Tooltips version. Latest version can be found on Jenkins: [https://jitpack.io/#Septicuss/tooltips](https://jitpack.io/#Septicuss/tooltips/) go to "Commits" tab, and click "Get it" on the highest commit, wait until it builds and use it in Maven or Gradle as outlined below: Also remember to add Tooltips as a dependency or soft-dependency in your plugin.yml: Copy depend: [Tooltips] or Copy softdepend: [Tooltips] ### [](https://tooltips.gitbook.io/tooltips/extra/api#maven) Maven Repository (JitPack) Copy jitpack.io https://jitpack.io Dependency Copy com.github.Septicuss tooltips VERSION provided ### [](https://tooltips.gitbook.io/tooltips/extra/api#gradle) Gradle Repository (JitPack) Copy maven { url 'https://jitpack.io' } Dependency Copy dependencies { implementation 'com.github.Septicuss:tooltips:VERSION' } [](https://tooltips.gitbook.io/tooltips/extra/api#using-the-api) Using the API ----------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/extra/api#tooltipsapi.java-static-methods) TooltipsAPI.java static methods Copy addCondition(Condition condition) removeCondition(String name) Set getConditions() addFunction(String name, Function function) removeFunction(String name, Function function) runAction(String action, Player player) sendTooltip(Player player, Preset preset) sendTooltip(Player player, Preset preset, List override) sendTooltip(Player player, Theme theme, List override) Tooltip getTooltip(Player player, Preset preset, @Nullable List override) Tooltip getTooltip(Player player, Theme theme, @Nullable List override) boolean doesThemeExist(String id) Theme getTheme(String id) Set getThemeIds() boolean doesPresetExist(String id) Preset getPreset(String id) Set getPresetIds() ### [](https://tooltips.gitbook.io/tooltips/extra/api#custom-conditions) Custom conditions Learn how to create custom conditions here: [Custom Conditions](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions) You can alternatively use the [compare](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list#compare) condition to compare PAPI placeholders of any custom plugin you may want to be supported. [PreviousVariables](https://tooltips.gitbook.io/tooltips/extra/variables) [NextCustom Conditions](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions) Last updated 6 months ago --- # Notable 2.0 Changes | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes.md) . [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#breaking-changes) 🔨 Breaking changes ------------------------------------------------------------------------------------------------------------ ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#change-of-id-format) Change of ID format The identifiers of all configured objects in Tooltips have been changed. Now the identifier includes the full path to the object. For example, this is what a preset ID would look like in a folder: `mypreset -> folder/file/mypreset` This will require modifification all theme ID in presets to match the new format. ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#local-placeholders-removed) Local placeholders removed Now instead of `%furniture_id%` and `%var_key%`, use context & variable [Functions](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#functions) . ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#furnish-no-longer-needed) Furnish no longer needed Furnish was used to store price data about IDs, you can now do that using the [$data function](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usddata-key) . ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#hex-codes-broken) Hex codes broken Now instead of hex color codes, the [MiniMessage format](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#minimessage) is used, even in preset background colors. [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#new) ✨ New --------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#functions) Functions Most important addition are furnitures. They allow to display advanced text and placeholders. Display static data from the preset file, context from conditions or conditional text. [Functions](https://tooltips.gitbook.io/tooltips/configuration/preset/functions) . ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#context) Context Now, conditions are able to provide context. Context is information about the things that a condition checks. For example, for a `lookingatfurniture` condition, the context is the ID of the furniture. This can be accessed using [functions](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#functions) . ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#data) Data This allows to define custom data in a preset file, which can be accessed with the [data function](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usddata-key) . This data can be prices of items, names of NPCs or text lines. This is a very powerful feature, which replaces Furnish. ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#minimessage) MiniMessage MiniMessage support, which allows for richer format in messages. However note that not all tags are included, since italic, bold and underline cannot be supported. [Learn more about the format](https://docs.advntr.dev/minimessage/format.html#minimessage-format) . ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#animations) Animations You can now animate text inside presets. It will only work if a preset is being shown using conditions. [Check out the animation types and format](https://tooltips.gitbook.io/tooltips/configuration/preset/animations) . ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#optimizations) Optimizations Split the condition and tooltip threads. Now conditions are checked separately from sending the tooltips, which means that tooltips can be refreshed more often. ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#priorities) Priorities Presets used to be checked more or less randomly. Now you can define a presets priority. The preset with the highest priority will be shown first. They can be set for [presets](https://tooltips.gitbook.io/tooltips/configuration/preset#properties) and for entire [preset file](https://tooltips.gitbook.io/tooltips/configuration/preset#file-priority) . ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#reshow) Reshow A [reshow property](https://tooltips.gitbook.io/tooltips/configuration/preset#show-defines-how-this-preset-is-shown) in presets, which will redisplay the tooltip (fade in & fade out) if text changes. ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#betonquest-support) BetonQuest support BetonQuest support, [documented here](https://tooltips.gitbook.io/tooltips/extra/integrations#betonquest) . Tutorial on how to use it here. ### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#other) Other #### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#support-for-quotes-in-arguments) \- Support for quotes in arguments Copy test{arg="Longer string with spaces"; arg1="another arg"} #### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#dynamic-conditions) \- Dynamic conditions Conditions can be registered at runtime, anytime (API related) #### [](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes#specify-custom-icon-width) \- Specify custom icon width Icons can now have a custom, user-provided width. Documented on [the icon page](https://tooltips.gitbook.io/tooltips/configuration/icon) . [PreviousArgument Types](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) [NextIntegrations](https://tooltips.gitbook.io/tooltips/extra/integrations) Last updated 1 year ago --- # Integrations | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/extra/integrations.md) . upported packet plugins * packetevents * ProtocolLib [](https://tooltips.gitbook.io/tooltips/extra/integrations#supported-furniture-plugins) Supported furniture plugins ------------------------------------------------------------------------------------------------------------------------ * [MythicCrucible](https://mythiccraft.io/index.php?resources/2) ( part of MythicMobs ) * [Nexo](https://www.spigotmc.org/resources/nexo-custom-blocks-items-furniture-emotes-resourcepack-manager-1-20-4-1-21-3.121103/) * [ItemsAdder](https://www.spigotmc.org/resources/73355) [](https://tooltips.gitbook.io/tooltips/extra/integrations#supported-region-plugins) Supported region plugins ------------------------------------------------------------------------------------------------------------------ * WorldGuard [](https://tooltips.gitbook.io/tooltips/extra/integrations#supported-placeholder-plugins) Supported placeholder plugins ---------------------------------------------------------------------------------------------------------------------------- Used in all tooltip text and some conditions. * PlaceholderAPI * * * [](https://tooltips.gitbook.io/tooltips/extra/integrations#other) Other ---------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/extra/integrations#betonquest) BetonQuest #### [](https://tooltips.gitbook.io/tooltips/extra/integrations#actions) Actions: * `beton-ready` - ran when BetonQuest has provided all required information to start the next conversation step. Use this to run actions to run the next steps. #### [](https://tooltips.gitbook.io/tooltips/extra/integrations#action-commands) Action commands: > These can only be used in preset actions! * `endconversation` - immediately ends the current players conversation if any. * `nextoption` - cycles onto the next option like 1 -> 2 -> 3 -> 1 -> ... * `selectoption (option)` - select the currently picked option or provide a numeric option #### [](https://tooltips.gitbook.io/tooltips/extra/integrations#conditions) Conditions: `**betonquest**` > This condition is triggered when the player engages in a BetonQuest conversation by right-clicking an NPC. In order for this to work, a conversation has to use the option: > > Copy > > conversationIO: tooltips **Context** key value `betonquest.npc` NPC's (quester) name `betonquest.text` Current dialogue in the conversation `betonquest.options` A list of currently selectable options `betonquest.selected` Number of currently selected option (changed with "`nextoption`" command above [](https://tooltips.gitbook.io/tooltips/extra/integrations#plugin-support-missing) Plugin support missing? --------------------------------------------------------------------------------------------------------------- Please make sure to contact us in our Discord server and tell us which plugin is missing! We'll be happy to add support. [PreviousNotable 2.0 Changes](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes) [NextVariables](https://tooltips.gitbook.io/tooltips/extra/variables) Last updated 1 year ago --- # Custom Conditions | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions.md) . ### [](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions#create-a-condition-class) Create a condition class For this example, let's create a condition that checks if the players food level is equal to or higher than a given amount. As a result, our condition will look like: `hunger {amount=10}` Copy import org.bukkit.entity.Player; import fi.septicuss.tooltips.object.preset.condition.Condition; import fi.septicuss.tooltips.object.preset.condition.argument.Arguments; import fi.septicuss.tooltips.object.validation.Validity; // Checks if players food level is above the given amount public class Hunger implements Condition { // These are the aliases for arguments. // You can yourself decide which aliases can be used. private static final String[] AMOUNT = {"amt", "amount"}; // Returns whether this condition is true with the // given arguments @Override public boolean check(Player player, Arguments args) { int amount = args.get(AMOUNT).getAsInt(); int foodLevel = player.getFoodLevel(); return (foodLevel >= amount); } // This method is triggered, when either the condition is true // and more context is needed or when its skipped. So this // method may be called if true or not. // // Put the context that this condition returns @Override public void writeContext(Player player, Arguments args, Context context) { context.put("food", player.getFoodLevel()); } // This method is used to check, whether the arguments are valid. // Once this check is complete, you can safely use the arguments in the // above check method. @Override public Validity valid(Arguments args) { if (!args.has(AMOUNT)) { return Validity.of(false, "Amount argument is missing!"); } if (!args.isNumber(AMOUNT)) { return Validity.of(false, "Amount argument must be a number!"); } return Validity.TRUE; } // Set the conditions ID, which will be used in preset configurations. @Override public String id() { return "hunger"; } } ### [](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions#register-the-condition) Register the condition Register this condition in your plugins `onLoad` like so: Copy @Override public void onLoad() { TooltipsAPI.addCondition(new Hunger()); } ### [](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions#restart-the-server) Restart the server Once the server loads, your condition should be in Tooltips! ### [](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions#more-examples) More examples For more examples on how to make conditions, check out the code of some official conditions in the [GitHub repository](https://github.com/Septicuss/tooltips/tree/master/src/main/java/fi/septicuss/tooltips/managers/condition/impl) . [PreviousAPI](https://tooltips.gitbook.io/tooltips/extra/api) Last updated 6 months ago --- # Argument Types | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types.md) . [](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types#regular) **Regular** ----------------------------------------------------------------------------------------------------- Name Description Value examples Concrete examples **Integer** A real number * 1 * 2 * 1000... * {distance = 10} **String** Regular text. Some may support PAPI placeholders * hello * %player\_name%... * {first=%player\_name%} **Boolean** true or false * true * false * {value=true} **Type** Specific type (clarified in the condition list) * creative * survival * grass\_block * {gm=creative} **Operation** Operation to perform on two variables * \== * <= * \>= * < * \> * {oper= <=} * {o==} **Location** A location in the players current world * \[ x, y, z\] * \[ 43, 64, -43\] * { l = \[43, 64, -43\] } **Slot** A players slot found [here](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html) * {slot=hand} [](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types#arrays) **Arrays** --------------------------------------------------------------------------------------------------- Some arguments support an array of specific types. For example the `gamemode` condition can define multiple game modes like so: `gamemode{gm=creative,survival}` which will trigger the condition if the players gamemode is either creative or survival. Array options are separated with a comma " , ". It's optional to specify multiple values in an array, it can just as well consist of a single value. Copy conditions: # Array of game mode types - gamemode { gm = creative, survival, adventure } # Array of material types - standingon { mat = grass_block, dirt_block } # Array of furniture id strings - lookingatfurniture { id = table, chair } [PreviousAnimations](https://tooltips.gitbook.io/tooltips/configuration/preset/animations) [NextNotable 2.0 Changes](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes) Last updated 1 year ago --- # Show | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/show.md) . [](https://tooltips.gitbook.io/tooltips/configuration/preset/show#introduction) Introduction ------------------------------------------------------------------------------------------------- Once all conditions are true, it's time to decide how we want our tooltip to be shown to the player. There are currently limited amount of options, but even with the ones available interesting behaviours can be achieved. Show properties are defined inside a presets conditions like so: Copy preset-id: text: ... conditions: ... show: reshow: false active: true cooldown: 10 [](https://tooltips.gitbook.io/tooltips/configuration/preset/show#properties) Properties --------------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/show#reshow) Reshow False by default. If set to true, will fully re-show the tooltip, with fade-ins and fade-outs if text of the tooltip changes. ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/show#active) Active Has a value of either **true** of **false**, which determines whether the preset is active or not. Activity here means the time for which the tooltip is shown. #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/show#true) true The tooltip will be shown as long as all of the conditions are true. This is useful for example when a tooltip has to constantly be shown when looking at a block. Preset example config[](https://tooltips.gitbook.io/tooltips/configuration/preset/show#preset-example-config) Copy 1: text: - 'Active is' - '{+4}{+1}&atrue' theme: default/three-line conditions: conditions: - lookingatblock{type=bedrock} true show: # Is active active: true Paired with fade options Preset example config[](https://tooltips.gitbook.io/tooltips/configuration/preset/show#preset-example-config-1) Copy 1: text: - 'Active is' - '{+4}{+1}&atrue' theme: default/three-line # Fade options set here fade: fadein: 20 fadeout: 20 conditions: conditions: - lookingatblock{type=bedrock} true show: # Active active: true #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/show#false) false The tooltip will be shown once using the provided fade options. If no fade options are provided, then the default stay time is 5 seconds (5 \* 20 ticks = 100 ticks). Preset example config[](https://tooltips.gitbook.io/tooltips/configuration/preset/show#preset-example-config-2) Copy 1: text: - 'Active is' - '{+4}&cfalse' theme: default/three-line fade: fadein: 20 stay: 20 fadeout: 20 conditions: conditions: - lookingatblock{type=bedrock} true show: # Not active active: false ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/show#cooldown) Cooldown Cooldown is a simple property that is applied to a whole preset. Once a preset has been shown once, it will go on a cooldown before being able to be shown again. This could be used to, for example remind the player every 5 minutes that they have not voted or are located in a region. The value of cooldown is an integer value of time in ticks. (1 second = 20 minecraft ticks) Preset example config[](https://tooltips.gitbook.io/tooltips/configuration/preset/show#preset-example-config-3) Copy 1: text: - 'Active is' - '{+4}{+1}&atrue' theme: default/three-line fade: fadein: 20 stay: 20 fadeout: 20 conditions: conditions: - lookingatblock{type=bedrock} true show: # Inactive, so only shows once active: false # Cooldown of 5 seconds cooldown: 100 [PreviousCondition list](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list) [NextActions](https://tooltips.gitbook.io/tooltips/configuration/preset/actions) Last updated 1 year ago --- # Functions | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/functions.md) . [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usage) Usage ---------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#format) Format All functions follow the following format. Arguments can also be wrapped in quotes. Copy $function(arg1, "arg2") Most functions can also be nested inside eachother, creating more complex behaviour. This is the main advantage of functions over placeholders. Copy $uppercase($var("pet_name")) // Cat -> CAT New functions can also be added with addons using [plugin API](https://tooltips.gitbook.io/tooltips/extra/api) . [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#default-functions) Default Functions ---------------------------------------------------------------------------------------------------------------- #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usddata-key) ⭐ `$data(key)` > Get data from the current preset file. See [how to define data in presets](https://tooltips.gitbook.io/tooltips/configuration/preset#data) > . Copy # EXAMPLE DATA data: key: 10 prices: sword: 100 chair: 50 lines: - 'Hello!' - 'How are you?' Copy // Returns the value from data.key $data(key) // 10 // Returns the value from data.prices.sword $data(prices.sword) // 100 // Returns the price from data.prices. $data(prices.$context(furniture.id)) // 50 if chair // Returns the 0 indexed element in list "lines" $data(lines[0]) // Hello // Returns the length (size) of a list $data(lines[length] // 2 * * * #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdhasdata-key) `$hasdata(key)` > Same as data, but returns _true_ if given path exists and _false_ if not. Copy $hasdata(key) // true $hasdata(fakekey) // false * * * #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdcontext-key) ⭐ `$context(key)` > Get a given key from condition context. In order for context to exist, the preset has to have this condition in its `conditions`. `$context(key)` can use similar keys to the data function. [See which conditions return context](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list) > . (By default, all conditions also return a `condition.` context, which has the result of the condition (true/false) ) Copy // true if "sneaking" condition is true $context(condition.sneaking) // true if "op" condition is true $context(condition.op) // world name if "world" condition is true $context(world) // get first element from a context $context(list[0]) * * * #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdhascontext-key) `$hascontext(key)` > Same as $context(key), but returns _true_ if context is set and _false_ if not. Copy // returns true if world context has been set $hascontext(world) * * * ⭐ `$if(condition, trueText, falseText)` > Conditional function, which takes an evaluated statement and depending on the output displays either trueText or falseText. Copy // returns the text "True!" $if(true, "True!", "False...") // returns "You're opped!" if player is opped $if($context(condition.op), "You're opped!", "You're not opped") * * * #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdvar-global-key-usdpvar-global-key) ⭐ `$var(global, key)` `$pvar(global, key)` > Variable functions allow to retrieve values from [variables](https://tooltips.gitbook.io/tooltips/extra/variables) > using a key. `$var` is used for local variables and `$pvar` is used for persistent (saved) variables. Copy // returns the value of the "busy" variable for current player, for ex. true $var("busy") // same as above, but persistent $pvar("busy") // returns the global and persistent "purchases" variable, for ex. 10 $pvar("global", "purchases") * * * #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdparse-player-text) `$parse(player, text)` > Parses the given text for another player, instead of the player viewing the tooltip. Copy // returns "Septicuss" $parse("Septicuss", "%player_name%") // returns the Vault balance of the target player $parse($context("lookingatplayer.name", %vault_eco_balance%) * * * #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#string-functions) String functions Copy $lowercase("HEY") // -> "hey" $uppercase("hey") // -> "HEY" $capitalize("hey") // -> "Hey" #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdstatic-text) ⭐ `$static(text)` > An important optimization function, which processes and caches the text within. This will stop the given text from being updated and will stay static. Copy // will display the value of the "busy" variable $static($var("busy")) * * * #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/functions#usdstrip-text) `$strip(text)` > Strips the given text from all animation tags. Useful when text has to be displayed in another tooltip after an animation was done. Copy // returns "Hello!" $strip("") * * * `$preprocess(text)` > Needed when importing text from elsewhere (for example using a placeholder or a function), which has animations. Copy // processes the animations of the first line defined in data $preprocess($data(lines[0])) * * * Can think of some other useful function? Suggest it in the Discord! [PreviousCommands](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands) [NextAnimations](https://tooltips.gitbook.io/tooltips/configuration/preset/animations) Last updated 1 year ago --- # Animations | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/configuration/preset/animations.md) . [](https://tooltips.gitbook.io/tooltips/configuration/preset/animations#usage) Usage ----------------------------------------------------------------------------------------- ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/animations#format) Format Animations can be altered using arguments provided to them. These depend on the animation type. Copy ### [](https://tooltips.gitbook.io/tooltips/configuration/preset/animations#order) Order All animations have an optional argument `id`, which defines the order in which this animation is executed. By default all animations run at once, but by specifying an `id`, animations will run in order. Example: Copy # This will run second # This will run third # This will run first [](https://tooltips.gitbook.io/tooltips/configuration/preset/animations#animations) Animations --------------------------------------------------------------------------------------------------- #### [](https://tooltips.gitbook.io/tooltips/configuration/preset/animations#typewriter) `typewriter` Typewriter animation, where each letter is typed out one-by-one. Copy [PreviousFunctions](https://tooltips.gitbook.io/tooltips/configuration/preset/functions) [NextArgument Types](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types) Last updated 1 year ago --- # Local Placeholders | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/extra/local-placeholders.md) . This plugin supports a few local placeholders, which can be useful with displaying names of elements you're looking at. Note that these can only be used inside the Tooltips plugin. ### [](https://tooltips.gitbook.io/tooltips/extra/local-placeholders#currently-implemented) Currently implemented Placeholder %furniture\_id% Id for the furniture you're currently looking at. Depends on the furniture plugin. %furniture\_name% Display name for the furniture you're currently looking at. Depends on the furniture plugin. %var\_% Returns the local player variable with the given ID. [Variables](https://tooltips.gitbook.io/tooltips/extra/variables) %var\_global\_% Returns a global variable with the given ID. [Variables](https://tooltips.gitbook.io/tooltips/extra/variables) %persistentvar\_% Returns the persistent (saved) player variable with the given ID. [Variables](https://tooltips.gitbook.io/tooltips/extra/variables) %persistentvar\_global\_% Returns the global persistent variables with the given ID. [Variables](https://tooltips.gitbook.io/tooltips/extra/variables) ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FyTF3bBteZCllDZPZpWBA%252Fimage.png%3Falt%3Dmedia%26token%3D747a3cc5-3db8-4793-a7d1-efb9897846f0&width=768&dpr=3&quality=100&sign=ad12784&sv=2) ItemsAdder requires a namespace before the furniture id Last updated 1 year ago --- # Unknown \# Tooltips ## Tooltips - \[Tooltips\](https://tooltips.gitbook.io/tooltips/tooltips.md) - \[Start here\](https://tooltips.gitbook.io/tooltips/start-here.md) - \[Support\](https://tooltips.gitbook.io/tooltips/support.md) - \[Features\](https://tooltips.gitbook.io/tooltips/plugin/features.md): Important terms and features used in this plugin - \[Commands\](https://tooltips.gitbook.io/tooltips/plugin/commands.md): Commands and their permissions - \[FAQ\](https://tooltips.gitbook.io/tooltips/plugin/faq.md) - \[Guides\](https://tooltips.gitbook.io/tooltips/plugin/guides.md) - \[Clearing cache\](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache.md): Clear leftovers after modifying your pack - \[Furniture shop\](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop.md): This page will cover how to setup fully (almost) Tooltips based furniture sale! - \[BetonQuest Dialogue\](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue.md) - \[Languages\](https://tooltips.gitbook.io/tooltips/plugin/guides/languages.md): Adding support for other languages in tooltips - \[Manual width\](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width.md) - \[Theme\](https://tooltips.gitbook.io/tooltips/configuration/theme.md) - \[Theme textures\](https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures.md) - \[Making a custom theme\](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme.md): Learn how to make custom textures for a theme. - \[Icon\](https://tooltips.gitbook.io/tooltips/configuration/icon.md) - \[Preset\](https://tooltips.gitbook.io/tooltips/configuration/preset.md): Presets consist of properties that define how a tooltip is shown. - \[Conditions\](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions.md): Display tooltips based on conditions - \[Condition list\](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list.md): List of all natively available conditions - \[Show\](https://tooltips.gitbook.io/tooltips/configuration/preset/show.md): Conditions are all true, now how do we show our tooltip? - \[Actions\](https://tooltips.gitbook.io/tooltips/configuration/preset/actions.md): Run commands when a tooltip is being shown. - \[Commands\](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands.md) - \[Functions\](https://tooltips.gitbook.io/tooltips/configuration/preset/functions.md): Add dynamic content into your presets - \[Animations\](https://tooltips.gitbook.io/tooltips/configuration/preset/animations.md) - \[Argument Types\](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types.md): Various argument types that are found in native conditions - \[Dynamic pricing\](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing.md): This guide will cover how to add dynamic prices to whatever item you want! - \[Selling furniture\](https://tooltips.gitbook.io/tooltips/guides/selling-furniture.md): This guide will cover how to set up a fully Tooltips based furniture sale - \[Notable 2.0 Changes\](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes.md): A migration guide. - \[Integrations\](https://tooltips.gitbook.io/tooltips/extra/integrations.md): List of currently supported plugins - \[Local Placeholders\](https://tooltips.gitbook.io/tooltips/extra/local-placeholders.md) - \[Variables\](https://tooltips.gitbook.io/tooltips/extra/variables.md) - \[API\](https://tooltips.gitbook.io/tooltips/extra/api.md) - \[Custom Conditions\](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions.md): Learn how to create custom Tooltips conditions in your plugin --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on a page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/tooltips.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Selling furniture | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/guides/selling-furniture.md) . [](https://tooltips.gitbook.io/tooltips/guides/selling-furniture#demo) Demo -------------------------------------------------------------------------------- [](https://tooltips.gitbook.io/tooltips/guides/selling-furniture#initial-setup) Initial setup -------------------------------------------------------------------------------------------------- 1. Download [Vault plugin](https://www.spigotmc.org/resources/34315) 2. Download [Vault placeholder expansion](https://api.extendedclip.com/expansions/vault/) (used to check if player has enough balance) 3. Download [furnish plugin](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing#setup) (used for dynamic prices) 4. Download `shop.yml` preset file below: 2KB [shop.yml](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2F1denRGB2dZBK6VL5BP8k%2Fshop.yml?alt=media&token=5cb16b88-59b5-4b33-9f00-b979c53baf2e) Download[Open](https://2056457066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO0fJVi4OrBJoOYrP9n9t%2Fuploads%2F1denRGB2dZBK6VL5BP8k%2Fshop.yml?alt=media&token=5cb16b88-59b5-4b33-9f00-b979c53baf2e) 1. Drag `shop.yml` into your `plugins/Tooltips/presets` folder. 2. If you're using ItemsAdder, go into the `shop.yml` file, and inside `main-confirm` preset in right-click actions, replace the `o give %player% %furniture_id%` action with `iaget %player% %furniture_id%` ![](https://tooltips.gitbook.io/tooltips/~gitbook/image?url=https%3A%2F%2F2056457066-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO0fJVi4OrBJoOYrP9n9t%252Fuploads%252FgkwzFez9mtIqPUv7CeVM%252Fimage.png%3Falt%3Dmedia%26token%3Dba8e7c02-abcc-41df-8319-7ca4b6b67333&width=768&dpr=3&quality=100&sign=e1e401d&sv=2) 3. Run `/tt reload` 4. Start setting prices for funriture that you want to be sold. [](https://tooltips.gitbook.io/tooltips/guides/selling-furniture#setting-prices) Setting prices ---------------------------------------------------------------------------------------------------- To set a price for a furniture, use `/furnish add [furniture_id] [price]`. More information [here](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing#quick-reference) . Last updated 1 year ago --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/tooltips.md). # Tooltips Welcome to the \[Tooltips plugin\](https://spigotmc.org/resources/109912) documentation. ### First setup {% content-ref url="/pages/ee6ehYGA134mWozPq7CF" %} \[Start here\](/tooltips/start-here.md) {% endcontent-ref %} ### Learn the basics {% content-ref url="/pages/FtKDdJ13f1W03uybGC7K" %} \[Features\](/tooltips/plugin/features.md) {% endcontent-ref %} ### Stuck? {% content-ref url="/pages/GVMhdCNFy6pX8CwnmQHU" %} \[Support\](/tooltips/support.md) {% endcontent-ref %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/tooltips.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Dynamic pricing | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing.md) . [](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing#demo) Demo ------------------------------------------------------------------------------ Video shows how to add price to Oraxen furniture with id 'cart' [](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing#setup) Setup -------------------------------------------------------------------------------- Download this addon and put it in your `plugins` folder! **PlaceholderAPI is required to use.** [CLICK TO DOWNLOAD](https://f005.backblazeb2.com/file/septicuss/projects/tooltips/docs/furnish-0.4.jar) [](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing#quick-reference) Quick Reference ---------------------------------------------------------------------------------------------------- _All commands require the user to be opped_ **If you have ItemsAdder** item or furniture, it requires a namespace in the format `mynamespace:myitem`, which you can see when for example giving yourself an ItemsAdder item. Command Description /furnish add \[id\] \[price\] Adds a price for the given ID /furnish remove \[id\] Removes a price for the given ID /furnish list Lists all prices /furnish reload Reload the configs _Placeholders require PlaceholderAPI to be supported_ Placeholder Description %furnish\_price\_\[ID\]% Returns the price of the given ID ### [](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing#example-uses) Example uses **Displaying the price of a specific furniture** Copy content: text: - 'This chair costs %furnish_price_chair%' **Displaying the price of a furniture that is beeing looked at** Copy content: text: - '%furniture_name%' - 'Price: &a$%furnish_price_%furniture_id%%' - '&7(Click to purchase)' **Checking if player has more balance than what the furniture that is being looked at costs** * %vault\_eco\_balance% -> placeholder provided by the [Vault placeholder extension](https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#vault) to check players balance Copy conditions: conditions: # Check if players vault balance is greater than # or equal ( >= ) the price of a furniture - compare{ first=%vault_eco_balance%; oper=>=; second=%furnish_price_%furniture_id%% } Last updated 1 year ago --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/support.md). # Support ### Discord Support is offered in the Sep Support Discord server! {% embed url="" %}
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/support.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/commands.md). # Commands ## Sending themes and presets {% hint style="info" %} These are intended only for testing the themes and presets. Please use \[conditions\](/tooltips/configuration/preset/conditions.md) to display tooltips. {% endhint %} \* \`/tt sendtheme \[player\] \[theme id\] (optional text)\` \* permission: \`tooltips.command.sendtheme\` \* \`/tt sendpreset \[player\] \[preset id\] (optional text)\` \* permission: \`tooltips.command.sendpreset\` \* Both allow optional text, which supports multiple lines using new lines "\\n". \* Text supports PAPI placeholders and local placeholders. \* If a preset already defines text, putting optional text in will override the preset text. \* Sending presets with a command \*\*does not account for conditions\*\*.
## Debugging presets Your preset isn't showing and you're not sure why? This command should help! It checks all conditions one by one and tells you whether a tooltip would show or not. \* \`/tt debug \[preset\] \[player\]\` \* permission: \`tooltips.command.debug\`
## Evaluating conditions {% hint style="info" %} Read more about conditions \[here\](/tooltips/configuration/preset/conditions.md). {% endhint %} A useful tool when working on conditions, is to see if they work. This can be done using the eval command: \* \`/tt eval \[condition\]\` \* permission: \`tooltips.command.eval\`
## Reloading the plugin Reloading the plugin will reload all themes, icons and presets and regenerate the required assets. \* \`/tt reload\` \* permission: \`tooltips.command.reload\` If you're using a plugin like Oraxen or ItemsAdder, remember to use their respective resource pack reload commands \*after\* using /tt reload; \`/oraxen reload pack\` and \`/iazip\` {% hint style="info" %} Haven't set up Nexo or ItemsAdder compatibility? Head to \[this page\](/tooltips/start-here.md). {% endhint %} ## Variable Commands Execute a local variable command. The use of this is to allow outside modification of Tooltips variables. \* \`/tt vars \[\`\[\`variable command\`\](/tooltips/configuration/preset/actions/commands.md#variables)\`\]\` \* permission: \`tooltips.command.vars\` \*\*Examples\*\* /tt vars setvar Septicuss meow true /tt vars setpersistentvar player meow false (this will actually set it for the person executing the command) /tt vars clearvars global /tt vars savepersistentvars --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/commands.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/features.md). # Features \* \[Themes \](/tooltips/configuration/theme.md)are used to define how a tooltip looks. \* The height of the tooltip \* How many text lines it supports \* The height at which text starts appearing \* The vertical spacing between lines \* \[Presets \](/tooltips/configuration/preset.md)are used to pre-set extra properties for tooltips. \* Defines text (\[MiniMessage format\](https://docs.advntr.dev/minimessage/format.html)) \* \[Animations\](/tooltips/configuration/preset/animations.md) to animate the text \* \[Functions\](/tooltips/configuration/preset/functions.md) to create more complex text \* Defines the fade property (tooltip fade in, stay and fade out) \* How it's displayed \* \[Theme\](/tooltips/configuration/theme.md) \* Color \* Horizontal shift \* \[Conditions \](/tooltips/configuration/preset/conditions.md)(display the tooltip based on certain conditions) \* \[Show \](/tooltips/configuration/preset/show.md)(how a tooltip is shown if conditions are true) \* \[Actions\](/tooltips/configuration/preset/actions.md) (interaction when a tooltip is shown) \* \[Variables\](/tooltips/extra/variables.md) is a feature used in Tooltips to support more complex behavior. They allow you to for example: \* Create a tooltip that is only shown once to a player \* Create a sequence of tooltips, for example a tutorial that moves to the next page on right click \* Create a shop with a confirmation --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/features.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/theme.md). # Theme This page covers how to create custom themes, which involves editing pixel textures. The plugin already offers several standard themes, so if those are sufficient - \[here's\](/tooltips/plugin/commands.md#sending-themes-and-presets) how to use them. Themes define how tooltips look. They provide the texture, define how many lines the theme supports and some ascent settings. ## Where to configure themes ### Configuration Themes are configured inside \`plugins/Tooltips/themes\`. Any \`.yml\` file inside of that folder or any subfolders will be checked for theme configurations. So you can configure your themes for example in: \* \`/themes/mythemes.yml\` \* \`/themes/mythemes/themes.yml\` Where \`mythemes\` -name can be anything you want.

All themes go in this directory

Any file name ending with .yml is supported. Even in sub-directories created inside themes

### Textures Textures for themes have to be located inside \`plugins/Tooltips/pack/assets\`. That path resembles a normal resource pack, which supports \[namespaces\](https://minecraft.wiki/w/Tutorials/Creating\_a\_resource\_pack#Adding\_a\_namespace\_folder). \*\*\* ## Example configuration

Example used

{% file src="/files/wiDhq9XJhwpXysz0F15K" %} Texture used above {% endfile %} \`\`\`yaml theme-one: path: "tooltips:tooltips/theme-one.png" height: 10 padding: # Optional left: 1 right: 0 lines: 1 ascents: theme-ascent: 0 text-start-ascent: -3 text-line-spacing: 5 \`\`\` ### Properties #### path The path to the texture inside \`.../pack/assets/\`. Uses namespaces, exactly how Minecrafts namespaces work. Example texture used is located in \`.../pack/assets/\`\`tooltips\`\`/textures/tooltips/theme-one.png\`. Where the highlighted part is the namespace used ( \`tooltips:\` ). {% hint style="warning" %} The amount of lines that a theme supports depends on the texture and its height. You will have to edit the textures yourself if you wish to support more lines. \[Here's how\](/tooltips/configuration/theme/theme-textures.md). {% endhint %} #### height Property that controls the size of the texture. Normally when working with fonts, this value would be equal to the height of the texture in pixels. However when working with tooltips, that would result in a texture that is overly large. That's why the best height is usually the textures size divided by two. In the example above, \`theme-one.png\` textures height is 20 pixels, so it's height is set as 10. \\ If it was instead 20 pixels, it would look like this:

height: 20

#### #### padding Defines how much space (in pixels) is added to the left or right part of the text.

padding: 2

#### #### lines How many lines does this theme support. This affects how many line files the plugin generates. If a tooltip uses more lines than its theme supports, the extra lines will show up broken.

lines: 1, but we're trying to add two lines through the newline "\\n"

{% hint style="warning" %} The amount of lines that is put here does \*\*\*not\*\*\* change the height of the texture. You will have to do that yourself using \[this guide\](/tooltips/configuration/theme/theme-textures.md). {% endhint %} #### ascents Acents in resource packs define how high something is offset from its origin point. The higher the ascent is, the higher the offset is vertically (up). The lower it is, the lower the offset is vertically (down). Can go in the negatives. #### theme-ascent Defines how high the theme is displayed. Can at maximum be as much as the height of the theme. Minimum is not limited.

theme-ascent: 0

theme-ascent: -10 (text-start-ascent must also be modified)

#### text-start-ascent Defines how high the first line of text is displayed. Can at max be 5, due to the fonts height being 5. Minimum is not limited.

theme-ascent: 0 and text-start-ascent: 0

theme-ascent: 0 and text-start-ascent: -3

#### text-line-spacing Is an useful option for multi-line tooltips. Defines in pixels the space between each new line.

text-line-spacing: 5

text-line-spacing: 3

--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/theme.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/guides.md). # Guides - \[Clearing cache\](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache.md): Clear leftovers after modifying your pack - \[Furniture shop\](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop.md): This page will cover how to setup fully (almost) Tooltips based furniture sale! - \[BetonQuest Dialogue\](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue.md) - \[Languages\](https://tooltips.gitbook.io/tooltips/plugin/guides/languages.md): Adding support for other languages in tooltips - \[Manual width\](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width.md) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/guides.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures.md). # Theme textures Themes are used to define \*\*how\*\* a tooltip looks. They're an essential building component and as such are required for everything else to work. It all starts with the themes texture, which looks like this:

Aseprite -software is recommended when working with textures

Tooltips consist of three parts; left, center and right. You can see all of them in the texture example above. The width of the texture is 6 pixels, which when divided by 3 (for all three parts) equates to 2 pixels per part. So the main rule when making custom themes, is to make their \*\*size divisible by three\*\*.

This is how the plugin will split the texture

For example, it is possible to make a wider and more detailed tooltip by setting the width to 12, so we have 4 pixels to work with:
With that much space, we can create more complex shapes for the borders. Here's an example:

Width: 12, height: 20

--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/theme/theme-textures.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/faq.md). # FAQ \*\*Which plugins does Tooltips support?\*\* \[Supported Plugins\](/tooltips/extra/integrations.md) page \*\*Which versions does Tooltips support?\*\* All versions 1.18+. Best works with the latest versions. #### How do I show tooltips based on conditions? To show tooltips based on conditions, you must use \[presets\](/tooltips/configuration/preset.md). \*\*How do I send tooltips to a player using a command?\*\* Refer to the \[Commands\](/tooltips/plugin/commands.md) page. \*\*Note that the command is only used for testing.\*\* \*\*How do I configure my own theme, icon or preset?\*\* \[Theme\](/tooltips/configuration/theme.md), \[Icon \](/tooltips/configuration/icon.md)and \[Preset \](/tooltips/configuration/preset.md)pages should be of help. \*\*My characters look like\*\*  If you're using an unsupported language, try following the \[Supporting other languages\](/tooltips/plugin/guides/languages.md) guide. Otherwise you might be using an unsupported amount of lines. \*\*How do I add support for other languages?\*\* -> Follow the \[Supporting other languages\](/tooltips/plugin/guides/languages.md) guide \*\*My text is offset when using other languages\*\*
-> Follow the \[Manual width\](/tooltips/plugin/guides/manual-width.md) guide --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/faq.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache.md). # Clearing cache {% hint style="info" %} This guide is only useful if you configured Tooltips to copy its resource pack into Nexo or ItemsAdder {% endhint %} In order to avoid deleting important files, Tooltips does not attempt to remove files it no longer needs inside folder of other plugins. This is why after you've completed configuring Tooltips its recommended to clear the old files of Tooltips inside Oraxen / ItemsAdder's packs. 1. Find the resource pack location \* For Nexo its \`plugins/Nexo/pack/assets\` \* For ItemsAdder its \`plugins/ItemsAdder/contents\` 2. Delete \`tooltips\` folder, that should be inside the resource pack location 3. Regenerate the resource pack using \`/tt reload\` 4. Reload your resource pack plugin 1. For Nexo its \`/nexo reload pack\` 2. For ItemsAdder its \`/iazip\` 5. Done! --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/guides/clearing-cache.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme.md). # Making a custom theme Let's create a theme that will support 3 text lines, with fancy borders like so:
### 1. Find the template texture First, open up your pixel art software. I personally recommend Aseprite, but Photoshop or other programs can also be used with proper configuration. Important thing is, that it should be good for pixel art. Next, find the default tooltip textures. They're located in: \* \`plugins/Tooltips/pack/assets/tooltips/textures/tooltips/default\` \* or \[on GitHub here\](https://github.com/Septicuss/tooltips/tree/master/src/main/resources/default/pack/assets/tooltips/textures/tooltips/default). Since we want 3 lines, we'll use the \`default-three-lines.png\`.

6x38 pixel default three lines

### 2. Editing the texture {% hint style="info" %} \*\*Note that a theme texture is split into 3 equal parts\*\*: \* LEFT \* MIDDLE \* RIGHT Which means that if your texture is 12 in width, each part will be 4 pixels: \*\*(AS SUCH, YOUR WIDTH HAS TO ALWAYS BE A MULTIPLE OF 3)\*\* {% endhint %} Now to make it our own, let's stretch it out so we have some room to work with \\ (setting canvas width to 12)

12x38 pixels

Now expanding the texture itself:

12x38, filled up

Change the corners to your liking:
And change the color:
Now our texture is done! ### 3. Configuration Now what's left is to configure the theme. #### 1. Add texture to plugin Save the modified template texture into \\ \`plugins/Tooltips/pack/assets/tooltips/textures/tooltips/custom\`\\ as\\ \`custom.png\`
#### 2. Configure theme Go into any theme \`.yml\` file (or create your own) inside \`plugins/Tooltips/themes\`. I will use \`plugins/Tooltips/themes/custom.yml\`. Now, copy the configuration \[of the template from here\](https://github.com/Septicuss/tooltips/blob/master/src/main/resources/default/config/themes/themes.yml). Since we used \`default-three-line\` as the template, we'll also take \`default-three-line\` configuration:
Paste it into your theme file:
Now edit the ID to your liking (don't leave it as \`default-three-line\`, because that already exists).
Edit the path to match the path where you put the texture. We put it into \* \`.../assets/tooltips/textures/tooltips/custom/\`\`custom.png\` So the path is \* \`tooltips:tooltips/custom/\`\`custom.png\` And lastly, edit the height to 19, because we changed the width. If not changed, it will look like this:
Here's the complete configuration:
Once done, update your resource pack and test the theme with \* \`/tt sendtheme \[PLAYER\] custom Text\` Download the texture done in this page here: {% file src="/files/RW7knlmzozUmqdH1KtcR" %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/theme/making-a-custom-theme.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width.md). # Manual width Unfortunately, not everything is perfect. While working on this plugin, I spent well more than two weeks experimenting and puzzling with width calculation. Width calculation is needed, so that we can know the width of a text line in order to start a new line at the correct position:

All widths are correct

I've figured out how to calculate it correctly for the default symbols, but legacy symbols are not so easy. Having spent countless of hours on it, I suppose there either isn't a straightforward solution or I'm just too dumb to figure it out. Either way, the situation is that some characters have wrong widths, which can cause the new lines to be offset like so:

Notice how the background is smaller than it needs to be and new lines 'a' is offset

In order for users to be able to fix that, I added a file where you can manually insert widths for characters. It's located in \`plugins/Tooltips/.data/widths.yml\` and looks somewhat like this: \`\`\`yaml # Optional file, which allows you to specify the pixel widths of unicodes # Note that pixels in this file can be of decimal format (1.25, 4.5 etc..) # This helps the plugin in width calculation '!': 2 `: 2 a: 3 b: 3 c: 3 d: 3 e: 3 f: 3 g: 3 h: 3 i: 3 j: 3 k: 3 l: 3 m: 3 n: 3 o: 3 \`\`\` In this file, you insert a character followed by the amount of decimal pixels, which will define it's width. Let's say we want to fix the \`ᄚ\` character. Best way to check if the character is broken, is to paste it a lot of times and check with \`/tt sendpreset default PLAYER ᄚᄚᄚᄚᄚᄚ\\na\` . With that, you can see that the last \`a\` character becomes offset:
To fix that, in the widths.yml file define its width like so: \`\`\`yaml ᄚ: 2 \`\`\` After which, you can do /tt reload and try the same command again:
As you can see, tha \`a\` is now aligned properly. ### How many pixels? If you test the character, and your \`a\` goes to the right, it means that the current width is too small, so you have to try something bigger:
If \`a\` goes to the left, it means your width is too big:
It's about experimentation. Try random values until you find one that aligns the \`a\` perfectly. You can test it easily by just editing & saving the \`widths.yml\` file and then reloading. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/guides/manual-width.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop.md). # Furniture shop {% stepper %} {% step %} ### Download required plugins and extensions \* \[PlaceholderAPI\](https://www.spigotmc.org/resources/6245) \* \[Vault\](https://www.spigotmc.org/resources/34315) \* Economy plugin (like \[Essentials\](https://www.spigotmc.org/resources/essentialsx.9089/)) \* \[Vault placeholder expansion\](https://api.extendedclip.com/expansions/vault/) (used to check the balance) \* Note that this is an expansion, easiest way to install it is running:\\ \`/papi ecloud download Vault\` and \`/papi reload\` \* \[WorldGuard\](https://dev.bukkit.org/projects/worldguard/files) (\*\*Optional\*\*, used to limit where furniture is sold) {% endstep %} {% step %} ### Add shop presets Now that all plugins are setup, \*\*download\*\* \`shop.yml\` and \*\*put\*\* it into \`plugins/Tooltips/presets\`. {% file src="/files/CZlkguXsyG7M9EInz5iX" %} {% endstep %} {% step %} ### Configure Open the above \`shop.yml\` file. There are 2 things that may be edited to fit your setup: 1. Furniture give command 1. \*\*Nexo\*\*: Already setup for Nexo 2. \*\*ItemsAdder\*\*: \`iagive %player% $context(furniture.id)\` 2. Economy take command 1. \*\*Essentials\*\*: Already setup They can be in the confirmation preset, and have a "EDIT ME" comment above them:
{% endstep %} {% step %} ### Region To limit furniture sale only to a given region, you can use WorldEdit. Remove all the # comments from region conditions:\\ !\[\](/files/GIOgdQsvT8eu9DJILms5)\\ \\ After that, in data change the shop regions name. This will be the WorldGuard region where you can buy furniture in:\\ !\[\](/files/YUbpwEXu35cvEuXvVnrf) {% endstep %} {% step %} ### Setup prices At the top of the \`shop.yml\` file, you can see the data section. This is where you define prices for the furniture. They are added by their ID.
{% endstep %} {% step %} ### Reload the plugin Simply run \`/tt reload\` and it should be ready to go! {% endstep %} {% endstepper %} ### Issues If you get any issues, --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/guides/furniture-shop.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Start here | Tooltips For the complete documentation index, see [llms.txt](https://tooltips.gitbook.io/tooltips/llms.txt) . This page is also available as [Markdown](https://tooltips.gitbook.io/tooltips/start-here.md) . Thank you for looking into the plugin! This page will go into how to set the plugin and the required dependencies up, as well as start configuring it. ### [](https://tooltips.gitbook.io/tooltips/start-here#video) Video Shows how to install Tooltips with Nexo (same way with ItemsAdder) ### [](https://tooltips.gitbook.io/tooltips/start-here#installation) Installation 1. Download the latest version of the plugin 2. Download the required dependency * [ProtocolLib](https://www.spigotmc.org/resources/1997) or [packetevents](https://www.spigotmc.org/resources/80279) 3. Drag the plugins into your `plugins` folder 4. Start or restart the server ### [](https://tooltips.gitbook.io/tooltips/start-here#after-restart) After restart If you're using Nexo or ItemsAdder, you can configure the plugin to automatically copy it's assets into those plugins' resource pack folders. Otherwise, use the "Without plugins" option. Nexo[](https://tooltips.gitbook.io/tooltips/start-here#nexo) Inside Tooltips 1. Go into `config.yml` 2. Set `copy-resource-pack` to `enabled: true` 3. Set the path to `path: Nexo/pack/assets` 4. Do `/tt reload` for Tooltips to generate its assets into Nexo 5. Do `/nexo reload all` to reload Nexo Repeat steps 4 and 5 anytime you update themes or icons. ItemsAdder[](https://tooltips.gitbook.io/tooltips/start-here#itemsadder) Inside Tooltips 1. Go into `config.yml` 2. Set `copy-resource-pack` to `enabled: true` 3. Set the path to `path: ItemsAdder/contents` 4. Do `/tt reload` for Tooltips to generate its assets into ItemAdder 5. Do `/iazip` to reload resource pack Repeat steps 4 and 5 anytime you update themes or icons. Without plugins[](https://tooltips.gitbook.io/tooltips/start-here#without-plugins) You will have to first [create your own resource pack](https://minecraft.fandom.com/wiki/Tutorials/Creating_a_resource_pack#Creating_a_resource_pack) (if you don't have an existing one already) and then copy the contents of `...plugins/Tooltips/.generated` into your resource packs `assets` folder. After that, host the resource pack somewhere (for example [here](https://mc-packs.net/) or [here](https://resourcepack.host/) ). You will have to re-merge the resource pack after every config change related to themes or icons. ### [](https://tooltips.gitbook.io/tooltips/start-here#additional-setup) Additional setup Some conditions require additional plugins. One notable one is PlaceholderAPI. See all of supported plugins here: [Integrations](https://tooltips.gitbook.io/tooltips/extra/integrations) ### [](https://tooltips.gitbook.io/tooltips/start-here#next-steps) Next steps Check out the Features to get a map of the plugin. [PreviousTooltips](https://tooltips.gitbook.io/tooltips) [NextSupport](https://tooltips.gitbook.io/tooltips/support) Last updated 1 year ago --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue.md). # BetonQuest Dialogue
{% stepper %} {% step %} ### Configure BetonQuest In order for Tooltips to be able to read BetonQuest dialogues, it has to be set as the \`conversationIO\`. This can be done in a conversation package: \`\`\`yaml conversations: Beton: quester: "Beton" first: "firstGreeting" interceptor: none # <-- This will allow chat to work conversationIO: tooltips # <-- Like so \`\`\` {% endstep %} {% step %} ### Create the necessary presets Here's a basic setup which supports animations. Put this into \`plugins/Tooltips/presets\`. The animations have to be defined in the BetonQuest config and must use the MiniMessage format. {% code title="dialogue.yml" %} \`\`\`yaml speaking: priority: 1 text: - $context(betonquest.npc) - $preprocess($context(betonquest.text)) theme: default/five-line conditions: - betonquest REQUIRED - compare{1=$var(done)} CANCEL actions: right-click: - skip animation-finished: - delay 3 setvar %player% done true done: priority: 2 text: - $context(betonquest.npc) - $static($strip($context(betonquest.text))) - $static($if($context(betonquest.options\[length\]) > 0, "» $context(betonquest.options\[$context(betonquest.selected)\])", "")) theme: default/five-line conditions: - betonquest REQUIRED - compare{1=$var(done)} REQUIRED actions: left-click: - nextoption - redisplay right-click: - selectoption $context(betonquest.selected) - delay 6 clearvar %player% done \`\`\` {% endcode %} Read more about \[BetonQuest integration here\](/tooltips/extra/integrations.md#betonquest). {% endstep %} {% step %} ### Reload Reload Tooltips using \`/tt reload\` Reload BetonQuest using \`/bq reload\` {% endstep %} {% endstepper %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/guides/betonquest-dialogue.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/plugin/guides/languages.md). # Languages {% hint style="info" %} Requires version \*\*1.6+\*\* {% endhint %} ### Setup 1. Download \`legacy.zip\` {% file src="/files/2CznvJPl2a3ySWEuNSA2" %} 2. Go into \`plugins/Tooltips/.data/schemas\` 3. Move all the contents of \`legacy.zip\` into the \`schemas\` folder What we just did, was add ALL possible unicodes into our schemas. This includes all \[CJK characters\](https://en.wikipedia.org/wiki/CJK\_characters) and many other missing unicodes from the default game. The problem with adding everything, is that the resource packs size has just grown to \*\*5mb+\*\*! Why has the size grown so much? Because each line in Tooltips has to use a separate font to control the vertical height at which it is shown. Each line has to contain every single unicode from the ones we just added. Plus there are a lot of textures for these characters to be shown, which also takes a lot of space. But there is a solution! Your tooltips most of the time do not need ALL the possible characters, which means that we can remove the redundant ones and reduce our resource pack size. ### Removing extra fonts First, determine which languages you need. This could be for example just Chinese, Japanese or Korean. Next go \[here\](https://unifoundry.com/pub/unifont/unifont-15.0.06/unifont-15.0.06.bmp). As you can see, it's a giant sheet which contains all the unicodes. If you zoom in, on the left you can see the index.
Find the start and ending index of the characters you want to be included. For the above image for example, to include accented and cyrillic characters you would need indexes starting at \*\*01\*\* and ending at \*\*05\*\*. After you have the range, go into your \`legacy-fonts.yml\` which should be located by now in \`plugins/Tooltips/.data/schemas\`. In there, you can see lots of providers that have names
Inside it, select and remove all providers that are not within your needed indexes. For example if we use the above indexes \*\*01\*\* and \*\*05\*\*, I would just need to remove all providers under \`unicode\_page\_05\`. After that's done, \[clear the cache\](/tooltips/plugin/guides/clearing-cache.md) and your Tooltips plugin should be able to support other fonts! ### Important! With some languages, there may be issues in the tooltips width (text is offset). In order to fix that, follow the \[Manual width guide\](/tooltips/plugin/guides/manual-width.md). --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/plugin/guides/languages.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands.md). # Commands Actions support some custom commands. Note that these are not actual commands that can be executed in chat and they only work inside actions. ## Commands Regular \* \[\*\*sound\*\*\](#sound) - send a sound to a player \* \[\*\*message\*\*\](#message) - send a message to a player \* \[\*\*delay\*\*\](#delay) - send multiple commands to player after a delay \*\*Variables\*\* \* \[\*\*setvar\*\*\](#setvar) - set a global or player variable \* \[\*\*setpersistentvar\*\*\](#setpersistentvar) - set a global or player persistent variable \* \[\*\*clearvar\*\*\](#clearvar) - clear a global or player variable \* \[\*\*clearpersistentvar\*\*\](#clearpersistentvar) - clear a global or player persistent variable \* \[\*\*clearvars\*\*\](#clearvars) - clear all global or player variables \* \[\*\*clearpersistentvars\*\*\](#clearpersistentvars) - clear all global or player persistent variables \* \[\*\*savepersistentvars\*\*\](#savepersistentvars) - save all persistent variables to the file #### Animations \* skip - skip animations ## Regular ### sound Send a sound to the player viewing the tooltip. > \*\*Arguments\*\* > > 1. sound name > \* used exactly the same way as in the /playsound command. > \* list of vanilla sounds can be found \[here\](https://www.digminecraft.com/lists/sound\_list\_pc.php) > 2. sound category > \* used exactly the same way as in the /playsound command. > \* list of sound categories can be found \[here\](https://www.digminecraft.com/lists/sound\_list\_pc.php) (on the right) > 3. volume (float) > 4. pitch (float) \*\*Examples\*\* \`\`\`yaml actions: on-show: - sound minecraft:block.amethyst\_block.break master 1 1 right-click: - sound custom:mysoundname master 1 1 \`\`\` ### message Send a message to the player viewing the tooltip. Supports hex, PAPI placeholders and \[local placeholders\](/tooltips/extra/local-placeholders.md). > \*\*Arguments\*\* > > Message \*\*Examples\*\* \`\`\`yaml actions: on-show: - message Welcome traveller! left-click: - message &cOuch! \`\`\` ### delay Send an array of commands to the player viewing the tooltip after a specific given delay. Commands are separated with a \`;\` and support both local commands (on this page) and outside commands. Supports all placeholders. > \*\*Arguments\*\* > > Time (ticks, 1 second = 20 minecraft ticks) > > Commands (separated with a ; ) \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: # After 1 second, message hello and kill the player - delay 20 message Hello!; kill %player% # After 5 seconds, set variable meow to false - delay 100 setvar player meow false \`\`\` ## Variables ### setvar Set a \[non-persistent\](/tooltips/extra/variables.md#persistence) variable for the given \[player or globally\](/tooltips/extra/variables.md#scope). Supports PAPI placeholders and \[local placeholders\](/tooltips/extra/local-placeholders.md). > \*\*Arguments\*\* > > \[Scope\](/tooltips/extra/variables.md#scope) \\\[ player / global / insert players name \] > > Variable name (supports placeholders) > > Value (\[supports mathematical evaluation\](/tooltips/extra/variables.md#evaluation)) \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: # Scope here is global, # variable name is meow # and value is 1 - setvar global meow 1 \`\`\` ### setpersistentvar Set a \[persistent\](/tooltips/extra/variables.md#persistence) variable for the given player or globally. Supports PAPI placeholders and \[local placeholders\](/tooltips/extra/local-placeholders.md). > \*\*Arguments\*\* > > Scope \\\[ player / global / insert players name \] > > Variable name (supports placeholders) > > Value (supports mathematical evaluation) \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: # Add 1 for each time the player looks at this tooltip - setpersistentvar player looked %persistentvar\_looked% + 1 \`\`\` ### clearvar Clear a \[non-persistent\](/tooltips/extra/variables.md#persistence) variable for the given player or globally. Supports PAPI placeholders and \[local placeholders\](/tooltips/extra/local-placeholders.md). > \*\*Arguments\*\* > > \[Scope\](/tooltips/extra/variables.md#scope) \\\[ player / global / insert players name \] > > Variable name (supports placeholders) \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: # Clears the "meow" variable, effectively removing it - clearvar player meow \`\`\` ### clearpersistentvar Clear a \[persistent\](/tooltips/extra/variables.md#persistence) variable for the given player or globally. Supports PAPI placeholders and \[local placeholders\](/tooltips/extra/local-placeholders.md). > \*\*Arguments\*\* > > \[Scope\](/tooltips/extra/variables.md#scope) \\\[ player / global / insert players name \] > > Variable name (supports placeholders) \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: # Clears the "meow" variable, effectively removing it - clearpersistentvar player looked \`\`\` ### clearvars Clear all \[non-persistent\](/tooltips/extra/variables.md#persistence) variables for either a given player or globally. > \*\*Arguments\*\* > > \[Scope\](/tooltips/extra/variables.md#scope) \\\[ player / global / insert players name \] \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: # Clear all global variables - clearvars global # Clear all players variables - clearvars player \`\`\` ### clearpersistentvars Clear all \[persistent\](/tooltips/extra/variables.md#persistence) variables for either a given player or globally. > \*\*Arguments\*\* > > \[Scope\](/tooltips/extra/variables.md#scope) \\\[ player / global / insert players name \] \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: # Clear all persistent global variables - clearpersistentvars global # Clear all persistent players variables - clearpersistentvars player \`\`\` ### savepersistentvars Save all \[persistent\](/tooltips/extra/variables.md#persistence) variables. \*\*Examples\*\* \`\`\`yaml actions: on-stop-showing: - savepersistentvars \`\`\` ## Animations ### skip Skips animations depending on given arguments. \*\*Note that the animations have to have an ID to be able to be skipped\*\*. > \*\*Arguments\*\* > > Skipped \\\[ current / all \] #### Examples \`\`\` actions: left-click: # Skips the current running animation - skip current # Skips ALL animations in the preset - skip all \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/actions/commands.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/conditions.md). # Conditions ## Introduction Conditions are defined per \[preset\](/tooltips/configuration/preset.md) and allow to control when a preset is displayed to the player. For a preset to be shown, all of its conditions must be evaluated to true. \`\`\`yaml conditions: # If players game mode is either creative or survival - gamemode {gm=creative, survival} true # If the player is looking at a grass block - lookingatblock {type=grass\_block} \`\`\` When conditions are checked, they are checked line by line. The above example would first check if the players gamemode is either creative or survival after which it would check if the player is also looking at a grass block. ### Structure The structure of a singular condition is really simple. It consists of just two parts; the conditions name and its possible arguments inside of curly brackets ( {} ): \`\`\` condition\_name { key: value ; key: value } \`\`\` \*\*All argument types are covered here:\*\* {% content-ref url="/pages/uTa7COjjZMcu4ZGQsiY8" %} \[Argument Types\](/tooltips/configuration/preset/argument-types.md) {% endcontent-ref %} If a condition does not have any required arguments, it can be defined without the curly brackets like so: \`\`\`yaml conditions: - night - day \`\`\` \*\*All conditions are covered here:\*\* {% content-ref url="/pages/RylgDsiKMQX4ruNZYPLp" %} \[Condition list\](/tooltips/configuration/preset/condition-list.md) {% endcontent-ref %} ## Outcomes An important part of optimizing conditions, is the ability to stop reading conditions early if some condition is false. For example, all operations that start with "lookingat" are expensive to perform, so it's imperative that they aren't checked often. This can be done using outcomes. Outcomes are optional and defined at the end of a full condition like so: \`\`\` - (outcome) \`\`\` ### Supported outcomes
OutcomeDescription
required (or true)The current line must be true. If it isn't, further conditions won't be checked.
cancel (or false)If the current line is true, further conditions won't be checked.
skipSkips the condition (does not check it), but still writes context
### Examples If we wanted to check if player is looking at furniture inside of a WorldGuard region called "shop", we'd put the region condition first and give it the "required" outcome: \`\`\`yaml conditions: # If players region is "shop" - region { r = shop } required # If player is looking at any type of furniture - lookingatfurniture required \`\`\` This way, the region condition will be performed first and only when it is true, will the "lookingatfurniture" run. ## Context Many conditions return context, which contains useful information about the target. For example, a \`time\` condition may return the current time in ticks or \`lookingatfurniture\` condition may return the name of the furniture. The context returned by conditions is documented in the \[condition list\](/tooltips/configuration/preset/condition-list.md). Conditions only return context if they are \`true\` or if the outcome is marked as "\`skip\`". Context can be used with the \[\`$context(key)\`\](/tooltips/configuration/preset/functions.md#usdcontext-key) function. ## Composite conditions Composite conditions allow you to do more complex logical checks in a single line using operators. ### Supported operators
OperatorDescription
AND ( also && )Left and right part must both be true
OR ( also || )Left or right part must be true
### Examples \`\`\`yaml conditions: # If the region is shop AND players gamemode is creative - region { r = shop } AND gamemode { gm = creative } true # If player is looking at any type of furniture or at any type of entity - lookingatfurniture || lookingatentity \`\`\` Even more extreme example, when operators are combined with parenthesis: {% code fullWidth="false" %} \`\`\`yaml conditions: # (If the region is shop) AND ( (player is either looking at a coach) OR (is in creative) ) - ( region {r = shop } ) AND (lookingatfurniture { id = coach } OR gamemode { gm = creative } ) \`\`\` {% endcode %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/conditions.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/extra/api.md). # API ## Add Tooltips to your plugin Fill in the \`VERSION\` with the Tooltips version. Latest version can be found on Jenkins: \[https://jitpack.io/#Septicuss/tooltips\](https://jitpack.io/#Septicuss/tooltips/) go to "Commits" tab, and click "Get it" on the highest commit, wait until it builds and use it in Maven or Gradle as outlined below: Also remember to add Tooltips as a dependency or soft-dependency in your plugin.yml: \`\`\`yaml depend: \[Tooltips\] \`\`\` or \`\`\`yaml softdepend: \[Tooltips\] \`\`\` ### Maven Repository (JitPack) \`\`\`xml jitpack.io https://jitpack.io \`\`\` Dependency \`\`\`xml com.github.Septicuss tooltips VERSION provided \`\`\` ### Gradle Repository (JitPack) \`\`\`gradle maven { url 'https://jitpack.io' } \`\`\` Dependency \`\`\`gradle dependencies { implementation 'com.github.Septicuss:tooltips:VERSION' } \`\`\` ## Using the API ### TooltipsAPI.java static methods \`\`\`java addCondition(Condition condition) removeCondition(String name) Set getConditions() addFunction(String name, Function function) removeFunction(String name, Function function) runAction(String action, Player player) sendTooltip(Player player, Preset preset) sendTooltip(Player player, Preset preset, List override) sendTooltip(Player player, Theme theme, List override) Tooltip getTooltip(Player player, Preset preset, @Nullable List override) Tooltip getTooltip(Player player, Theme theme, @Nullable List override) boolean doesThemeExist(String id) Theme getTheme(String id) Set getThemeIds() boolean doesPresetExist(String id) Preset getPreset(String id) Set getPresetIds() \`\`\` ### Custom conditions Learn how to create custom conditions here: {% content-ref url="/pages/JXFrNGjauuUAQtXjkhKT" %} \[Custom Conditions\](/tooltips/extra/api/custom-conditions.md) {% endcontent-ref %} You can alternatively use the \[compare \](/tooltips/configuration/preset/condition-list.md#compare)condition to compare PAPI placeholders of any custom plugin you may want to be supported. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/extra/api.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/extra/variables.md). # Variables As a miscellaneous tool, this plugin supports internal variables. These variables can be set inside actions or through a command by admins and then used to check conditions inside tooltips. Variables have a target, persistence and are defined through key-value pairs. For example, you can have a variable named "\`meow\`" equal to "\`true\`" or "\`amount\`" equal to \`5\`. ## Usage Below is a reference table, which shows where and how variables can be used; \*If you want to modify variables, you can do it:\* \* Inside tooltips' \[actions\](/tooltips/configuration/preset/actions.md), using \[variable commands\](/tooltips/configuration/preset/actions/commands.md)\\ For example: \`\`\`yaml conditions: conditions: # When looking at a bedrock block - lookingatblock{type=bedrock} true actions: right-click: # And right clicking that bedrock block, set players variable "cool" to "true" - setvar %player% cool true \`\`\` \* Externally (outside of actions), using the \[vars command\](/tooltips/plugin/commands.md#variable-commands)\\ For example:\\ \`/tt vars setvar Septicuss cool true\` \*If you want to use variables in conditions (to check something)\* \* Use the \[compare condition \](/tooltips/configuration/preset/condition-list.md#compare)with \[variable functions\](/tooltips/configuration/preset/functions.md#usdvar-global-key-usdpvar-global-key)\\ For example: \`\`\`yaml conditions: conditions: # Check if player has variable "cool" set to true - compare{ first=$var(cool); second=true } \`\`\` \*If you want to use variables in tooltips text\* \* Use the \[variable functions\](/tooltips/configuration/preset/functions.md#usdvar-global-key-usdpvar-global-key)\\ For example: \`\`\`yaml content: text: - 'Is the player viewing' - 'this tooltip cool?' - '$var(cool)' \`\`\` \*If you want to display variables outside of Tooltips in other plugins\* \* Use \[PlaceholderAPI variable placeholders\](#placeholderapi)\\ For example:\\ \`/papi parse Septicuss %tooltips\_v\_cool%\` ## Terminology ### Persistence There are persistent and non-persistent variables. Persistence means that variables are saved into files and kept around. Non-persistent variables are reset on server restart, persistent variables can only be cleared through the proper commands. ### Scope Variable commands define a scope, which defines who this variable will be set for. | Scope | Explanation | | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | Global | A global variable applied to all players. | | Player | The current player. For example, if this scope is used in actions, the action command will be executed for the player with an active tooltip. | | \\ | An online players name. Using this will set it only for a specific player. | ## Evaluation Setting the variable supports mathematical expressions, which can utilize PAPI placeholders and local placeholders. Examples: \`\`\` setvar player myvariable (1+1) setvar global goofballs $var(global, goofballs) + 1 setvar global goofballs ($var(global, goofballs) / $var(myvariable)) \* 30 + 25 /tt setpersistentvar Septicuss personal\_number 31\*5 \`\`\` ## PlaceholderAPI Using PlaceholderAPI placeholders has been made as simple as possible. Placeholders are dynamic, and you have to build them using keys:
KeyDescription
vvariable (always required)
gglobal
ppersistent
#### Structure of a placeholder \`%tooltips\_\[KEY\]\_\[ID\]%\` \\\[KEY\] -> multiple keys combined in any order \\\[ID\] -> ID of the variable being requested #### Examples \*Get the player variable "cool"\* \`%tooltips\_v\_cool%\` \*Get the global variable "cool"\* \`%tooltips\_gv\_cool%\` \*Get the \*\*persistent\*\* player variable "tutorial\\\_passed"\* \`%tooltips\_pv\_tutorial\_passed%\` \*Get the \*\*persistent\*\* global variable "views"\* \`%tooltips\_pgv\_views%\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/extra/variables.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions.md). # Custom Conditions ### Create a condition class For this example, let's create a condition that checks if the players food level is equal to or higher than a given amount. As a result, our condition will look like: \`hunger {amount=10}\` \`\`\`java import org.bukkit.entity.Player; import fi.septicuss.tooltips.object.preset.condition.Condition; import fi.septicuss.tooltips.object.preset.condition.argument.Arguments; import fi.septicuss.tooltips.object.validation.Validity; // Checks if players food level is above the given amount public class Hunger implements Condition { // These are the aliases for arguments. // You can yourself decide which aliases can be used. private static final String\[\] AMOUNT = {"amt", "amount"}; // Returns whether this condition is true with the // given arguments @Override public boolean check(Player player, Arguments args) { int amount = args.get(AMOUNT).getAsInt(); int foodLevel = player.getFoodLevel(); return (foodLevel >= amount); } // This method is triggered, when either the condition is true // and more context is needed or when its skipped. So this // method may be called if true or not. // // Put the context that this condition returns @Override public void writeContext(Player player, Arguments args, Context context) { context.put("food", player.getFoodLevel()); } // This method is used to check, whether the arguments are valid. // Once this check is complete, you can safely use the arguments in the // above check method. @Override public Validity valid(Arguments args) { if (!args.has(AMOUNT)) { return Validity.of(false, "Amount argument is missing!"); } if (!args.isNumber(AMOUNT)) { return Validity.of(false, "Amount argument must be a number!"); } return Validity.TRUE; } // Set the conditions ID, which will be used in preset configurations. @Override public String id() { return "hunger"; } } \`\`\` ### Register the condition Register this condition in your plugins \`onLoad\` like so: \`\`\`java @Override public void onLoad() { TooltipsAPI.addCondition(new Hunger()); } \`\`\` ### Restart the server Once the server loads, your condition should be in Tooltips! ### More examples For more examples on how to make conditions, check out the code of some official conditions in the \[GitHub repository\](https://github.com/Septicuss/tooltips/tree/master/src/main/java/fi/septicuss/tooltips/managers/condition/impl). --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/extra/api/custom-conditions.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/actions.md). # Actions Actions allow players to interact with tooltips. When any type of tooltip is currently being shown using presets conditions, you are able to listen to actions and execute commands. ## Action configuration \`\`\`yaml preset-id: content: text: - 'Looking at bedrock' display: theme: default-one-line conditions: conditions: - lookingatblock{type=bedrock} true # Actions are specified optionally here actions: # Action name and list of commands right-click-block: # A single "say hi" command that will be executed by the console - say hi \`\`\`

right-click-block action executes the "say hi" command in console

### Supported actions
ActionDescription
left-clickAny type of left click
left-click-airLeft click air
left-click-blockLeft click a block
left-click-entityLeft click an entity
right-clickAny type of right click
right-click-airRight click air
(only works with an item in hand, blame Spigot)
right-click-blockRight click a block
right-click-entityRight click an entity
on-showTriggered when a tooltip is first triggered
on-stop-showingTriggered when a tooltip stops being shown
animation-finishedTriggered when all animations are done
### Commands All commands support both PAPI and local placeholders, as well as a backup built-in %player% placeholder for the players username. This plugin provides some custom commands for convenience. Read more about them here: {% content-ref url="/pages/yyG599C2wADNhiMoKqEp" %} \[Commands\](/tooltips/configuration/preset/actions/commands.md) {% endcontent-ref %} ### Examples \`\`\`yaml actions: # All right and left clicks will make the console say hi left-click: - say hi right-click: - say hi \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/actions.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list.md). # Condition list ## Contents Currently, the plugin natively supports the following conditions: \* \[compare\](#compare) \\\[ Compare two values \] \* \[permission\](#permission) \\\[ Whether a player has specified permissions \] \* \[op\](#op) \\\[ Whether a player is opped \] \* \[gamemode\](#gamemode) \\\[ Whether the players gamemode is among specified ones \] \* \[location\](#location) \\\[ Whether the players location matches the given location \] \* \[incuboid\](#incuboid) \\\[ Whether a player is in a cuboid \] \* \[standingon\](#standingon) \\\[ Which type of block the player is standing on \] \* \[sneaking\](#sneaking) \\\[ Whether the player is sneaking \] \* \[world\](#world) \\\[ Which world the player is in \] \* \[day\](#day) \\\[ Whether its day in the players world \] \* \[night\](#night) \\\[ Whether its night in the players world \] \* \[time\](#time) \\\[ What time is it in the players world \] \* \[lookingatblock\](#lookingatblock) \\\[ What type of block the player is looking at \] \* \[lookingatfurniture\](#lookingatfurniture) \\\[ If player is looking at plugin furniture \] \*\*\\\*1\*\* \* \[lookingatentity\](#lookingatentity) \\\[ If player is looking at an entity \] \* \[entitynbtequals\](#entitynbtequals) \\\[ Check nbt values of the entity that is being looked at \] \*\*\\\*2\*\* \* \[tileentitynbtequals\](#tileentitynbtequals) \\\[ Check nbt values of the tile entity that is being looked at \] \*\*\\\*2\*\* \* \[blocknbtequals\](#blocknbtequals) \\\[ Check nbt values of the block that is being looked at \] \*\*\\\*2\*\* \* \[blockstateequals\](#blockstateequals) \\\[ Check blockstate values of the block that is being looked at \] \* \[lookingatcitizen\](#lookingatcitizen) \\\[ Whether player is looking at a Citizens NPC \] \*\*\\\*4\*\* \* \[lookingatmythicmob\](#lookingatmythicmob) \\\[Whether player is looking at a MythicMob mob\] \*\*\\\*5\*\* \* \[equipped\](#equipped) \\\[ If a player has the item equipped in hands or on body \] \* \[itemnbtequals\](#itemnbtequals) \\\[ If players equipped item has given nbt data \] \*\*\\\*2\*\* \* \[region\](#region) \\\[ If players region is among specified ones \] \*\*\\\*3\*\* \*\*Notes\*\*: 1. Requires a supported \[furniture plugin\](/tooltips/extra/integrations.md#supported-furniture-plugins) 2. Requires \[NBT API\](https://www.spigotmc.org/resources/7939) plugin 3. Requires a \[region plugin\](/tooltips/extra/integrations.md#supported-region-plugins) 4. Requires \[Citizens\](https://www.spigotmc.org/resources/13811) 5. Requires \[MythicMobs\](https://mythiccraft.io/index.php?resources/mythicmobs.1/) ## Conditions ### compare
ArgumentTypeExample
1, firstString (supports placeholders)%player\_name%
2, secondString (supports placeholders)%player\_health%
o, oper, operation (optional)Operation
| Context | Description | | -------------- | ------------------------------------- | | compare.first | Parsed value of the "first" argument | | compare.second | Parsed value of the "second" argument | #### Description > If only first is set and it's a boolean, will check if it's true > > If both first and second are set and they are strings, they will be compared if they are equal. If they are booleans (true / false) they will be also compared if they are equal. > > If operation is set and both first & second arguments are numbers, will use the operation to compare the variables. \*\*Examples\*\* \`\`\`yaml conditions: # Check if players health is more than or equal to 20.0 - compare { first = %player\_health%; operation = >=; second= 20.0 } # Check if both are equal (they aren't) - compare { 1=true; 2=false } # Check if players name is Septicuss - compare { 1=%player\_name%; 2=Septicuss } \`\`\` ### permission
ArgumentTypeExample
p, perm, permissionString arraytooltips.command.reload
#### Description > Checks if player has any of the permissions in the string array \*\*Examples\*\* \`\`\`yaml conditions: # Check if player has the permission to a command - permission { p = tooltips.command.reload } # Check if player has either of the two permissions - permission { perm = first, second } \`\`\` ### op #### Description > Checks if player is opped \*\*Examples\*\* \`\`\`yaml conditions: - op \`\`\` ### gamemode
ArgumentTypeExample
gamemode, gmType of gamemode arraycreative, survival
#### Description > Checks if player has any of the given gamemodes \*\*Examples\*\* \`\`\`yaml conditions: # Check if players game mode is adventure - gamemode { gm = adventure } # Check if players game mode is either creative or survival - gamemode { gamemode = creative, survival } \`\`\` ### location
ArgumentTypeExample
location, loc, lArray of Location\[ 22, 602, -234\]
or
\[22, 602, -234\], \[22, 603, -233\]
#### Description > Checks if player is at the given coordinates in their current world \*\*Examples\*\* \`\`\`yaml conditions: # Check if the current location is x,y,z = 22, 602, -234 - location { l = \[ 22, 602, -234 \] # Check if the current location is either 22 602 -234 or 22 603 -233 - location { l = \[ 22, 602, -234\], \[ 22, 603, -233\] } \`\`\` ### incuboid
ArgumentTypeExample
first, 1, firstpointLocation\[ 22, 602, -234\]
second, 2, secondpointLocation\[49, 620, -251\]
#### Description > \*\*This check is more resource-intensive than the "region" condition, due to being unable to cache which cuboid the player is currently in.\*\* > > \\ > Checks if player is within the two given locations. \*\*Examples\*\* \`\`\`yaml conditions: # Check if player is within location at 22, 602, -234 and 49, 620, -251 - incuboid { first = \[ 22, 602, -234 \]; second = \[49, 620, -251\] } \`\`\` ### standingon
ArgumentTypeExample
type, m, mat, materialType of material arraygrass\_block, obsidian
#### Description > Checks if player is currently standing on any of the given materials. Can also be air to check if the block under the player is air. \*\*Examples\*\* \`\`\`yaml conditions: # Check if player is standing on grass or dirt blocks - standingon { type = grass\_block, dirt } # Check if player is standing on a block of obsidian - standingon { m = obsidian } \`\`\` ### sneaking #### Description > Checks if player is currently sneaking \*\*Examples\*\* \`\`\`yaml conditions: # Check if player is sneaking - sneaking \`\`\` ### world
ArgumentTypeExample
nameString arrayworld, resource\_world
| Context | Description | | ------- | ---------------------- | | world | Returns the world name | #### Description > Checks if players world is any of the ones defined in the name string array. \*\*Examples\*\* \`\`\`yaml conditions: # Check if player is in the world called "world" - world { name = world } # Check if player is either in the nether or the end worlds - world { name = world\_nether, world\_the\_end } \`\`\` ### day #### Description > Checks if its day (time between 0 and 13000) in the players current world. \*\*Examples\*\* \`\`\`yaml conditions: # Check if its day in the players current world - day \`\`\` ### night #### Description > Checks if its night (time between 13000 and 24000) in the players current world. \*\*Examples\*\* \`\`\`yaml conditions: # Check if its night in the players current world - night \`\`\` ### time
ArgumentTypeExample
time, tInteger1000, 13000
o, oper, operation (optional)Operation>=
#### Description > Checks if the current \[time\](https://minecraft.fandom.com/wiki/Daylight\_cycle) in the players world is equal to the given time argument. > > If operation is included, a comparison operation is conducted, with given time argument being the first comparable. \*\*Examples\*\* \`\`\`yaml conditions: # Checks if the time in the players current world is greater than or equal to 1000 - time { time = 1000; oper = >= } # Checks if the time in the players current world is between 0 and 5000 inclusive - time {t=0; oper=>=} AND time {t=5000; oper=<=} \`\`\` ### lookingatblock
ArgumentTypeExample
type, m, mat, material (optional)Type of material arraybedrock, grass\_block
location, loc, l (optional)Array of Location\[0, 64, 50\]
distance, d (optional)Integer3, 5
#### Description > If no type or location is given, will return true if any type of block is being looked at. > > If type is defined, will check if the block that is being looked at is of specific material > > If location is defined, will check if the block that is being looked at is at specific coordinates in the players current world > > If distance is defined (3 by default), will increase or decrease the distance at which the block that is being looked at is detected \*\*Examples\*\* \`\`\`yaml conditions: # Check if player is looking at bedrock - lookingatblock{type=bedrock} # Check if player is looking at an acacia sign at given coordinates - lookingatblock{l=\[440,65,803\]; m=acacia\_sign} # Check if player is looking at blocks in given three coordinates - lookingatblock{l=\[440,65,803\],\[441,65,808\],\[442,65,803\]} # Check if player is looking at an acacia sign at given coordinates with increased distance - lookingatblock{l=\[440,65,803\]; m=acacia\_sign; d=6} \`\`\` ### lookingatfurniture
ArgumentTypeExample
id (optional)String arraycouch, chair
distance, d (optional)Integer3, 5
| Context | Description | | ---------------- | ------------------------------------------------------------ | | furniture.id | ID of target furniture | | furniture.name | Name of the furniture as defined in the config of the plugin | | furniture.plugin | The plugin where this furniture came from | #### Description > Requires any supported furniture plugin to work. > > If no ids are given, checks if player is looking at any furniture within the distance (3 by default). > > If ids are given, checks if the furniture the player is looking at has any of the ids. > > Distance argument increases the distance at which furniture is checked. \*\*Examples\*\* \`\`\`yaml conditions: # Checks if player is looking at any type of furniture - lookingatfurniture # Checks if player is looking at a furniture with id of couch or chair - lookingatfurniture {id=couch, chair} # Previous but with a distance of 6 - lookingatfurniture {id=lamp; distance=6} \`\`\` ### lookingatentity
ArgumentTypeExample
entity, type, t (optional)Type of entity type arrayvillager, sheep
distance, dist, d (optional)Integer3, 5
#### Description > If no types are given, checks if player is looking at any type of entity (armor stands etc. too) > > If types are given, checks if player is looking at any of the given entity types > > If distance is given, will increase the distance that entities are checked at (3 by default) \*\*Examples\*\* \`\`\`yaml conditions: # Player is looking at a villager - lookingatentity {t=villager} # Player is looking at a cow or a pig - lookingatentity {entity=cow,pig} \`\`\` ### entitynbtequals
ArgumentTypeExample
key, kStringmynbtkey
nbtvalue, nbtval, value, val, vString, Integer or Booleanweird, 10, false
distance, dist, d (optional)Integer3, 5
#### Description > Requires NBT API plugin to work. > > Checks if the targeted entity within distance (3 by default) has a key with given value > > Supports basic NBT paths as key. Example: \`Item.tag.CustomModelData\` \*\*Examples\*\* \`\`\`yaml conditions: # Checks if integer at "mynbtkey" equals 10 - entitynbtequals {key=mynbtkey; value=10} # Checks if boolean at "mynbtkey" equals false - entitynbtequals {key=mynbtkey; value=false} # .. same for string as the value \`\`\` ### tileentitynbtequals
ArgumentTypeExample
key, kStringmynbtkey
nbtvalue, nbtval, value, val, vString, Integer or Booleanweird, 10, false
distance, dist, d (optional)Integer3, 5
#### Description > Requires NBT API plugin to work. > > Checks if the targeted tile entity within distance (3 by default) has a key with given value > > Supports basic NBT paths as key. Example: \`Item.tag.CustomModelData\` \*\*Examples\*\* \`\`\`yaml conditions: # Checks if a (block) player skull owner is Septicuss - lookingatblock{type=player\_head} - tileentitynbtequals{key=SkullOwner.Name; value=Septicuss} \`\`\` ### blocknbtequals
ArgumentTypeExample
key, kStringmynbtkey
nbtvalue, nbtval, value, val, vString, Integer or Booleanweird, 10, false
distance, dist, d (optional)Integer3, 5
#### Description > Requires NBT API plugin to work. > > Checks if the targeted block within distance (3 by default) has a key with given value > > Supports basic NBT paths as key. Example: \`Item.tag.CustomModelData\` \*\*Examples\*\* \`\`\`yaml conditions: # Checks if the target block has a key 'hello' with value true - blocknbtequals{key=hello; value=true} \`\`\` ### blockstateequals
ArgumentTypeExample
key, k, idStringnote, powered
value, val, vString, Integer or Booleanweird, 10, false
distance, dist, d (optional)Integer3, 5
#### Description > Checks if the targeted blocks \[block state\](https://minecraft.fandom.com/wiki/Block\_states) within distance (3 by default) has a key with given value \*\*Examples\*\* \`\`\`yaml conditions: - lookingatblock{type=note\_block} # Optional # Check if the note blocks "powered" state is equal to "false" - blockstateequals{key=powered; val=false} # Check if the note blocks "note" is equal to 15 - blockstateequals{key=note; value=15} \`\`\` ### lookingatcitizen
ArgumentTypeExample
id, name (optional)Integer array0, 1, 5, 23
distance, dist, d (optional)Integer3, 5
#### Description > Requires Citizens plugin to work. > > Checks if the targeted entity within distance (3 by default) is a Citizens NPC. > > If ids are present, checks if the targeted NPC has any of the given ids.
> > Citizen ids can be seen by first selecting an NPC using commands and typing /npc:!\[\](/files/2kkI7kgnllfcNT9D6iyM) \*\*Examples\*\* \`\`\`yaml conditions: # If player is looking at a Citizen with the id 0 - lookingatcitizen{id=0} # If player is looking at a Citizen with either id 2 or 23 - lookingatcitizen{id=2,23} # IF player is looking at a Citizen from 10 blocks away - lookingatcitizen{dist=10} \`\`\` ### lookingatmythicmob
ArgumentTypeExample
id, ids (optional)String arrayjohn, spider
distance, dist, d (optional)Integer3, 5
#### Description > Requires MythicMobs plugin to work. > > Checks if the targeted entity within distance (3 by default) is a MythicMobs mob > > If ids are present, checks if the targeted mythic mob has any of the given ids. \*\*Examples\*\* \`\`\`yaml conditions: # If player is looking at a MythicMob with the id 'my-boss' - lookingatmythicmob{id=my-boss} # If player is looking at a MythicMob with either id 'my-boss' or 'john' - lookingatmythicmob{id=my-boss,john} # If player is looking at any MythicMob from 10 blocks away - lookingatmythicmob{dist=10} \`\`\` ### equipped
ArgumentTypeExample
type, m, mat, materialType of material arraystone\_axe, flint\_and\_steel
slot, s (optional)Slothand, helmet
#### Description > Checks if item at the given slot (main hand by default) has the given type \*\*Examples\*\* \`\`\`yaml conditions: # If player has a diamond sword in their main hand - equipped { type=diamond\_sword } # If player has a compass in their off hand - equipped { s = off\_hand; type = compass } # If player has a diamond or gold helmet equipped - equipped {slot=helmet; type=diamond\_helmet,gold\_helmet} \`\`\` ### itemnbtequals
ArgumentTypeExample
key, kStringmynbtkey
nbtvalue, nbtval, value, val, vString, Integer or Booleanweird, 10, false
slot, s (optional)Slotoff\_hand, legs
#### Description > Requires NBT API plugin to work. > > Checks if item at the given slot (main hand by default) has an item with the given nbt key with given nbt value in it.\\ > Supports basic NBT paths as keys. Example: \`Item.tag.CustomModelData\` \*\*Examples\*\* \`\`\`yaml conditions: # Checks if the custom model data nbt tag of the held item is equal to 1 - itemnbtequals { key = CustomModelData; value=1} \`\`\` ### region
ArgumentTypeExample
r, reg, region, name, id (optional)String arrayshop, spawn
| Context | Description | | ------- | ----------------- | | region | Current region ID | #### Description > Requires any \[region\](/tooltips/extra/integrations.md#supported-region-plugins) plugin to work. > > Checks if player is in any of the given region ids > > If no regions are provided, returns true if player is inside of any region \*\*Examples\*\* \`\`\`yaml conditions: # Check if player is in the shop region - region { r = shop } # Check if player is either inside the spawn region or the crates region - region { r = spawn, crates } \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/condition-list.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset.md). # Preset ## Configuration Presets are configured in the \`Tooltips/presets\` folder. To create presets, create a new file in the folder as \`.yml\`. After that, you can start configuring presets in that file. ### Configuration All of these, except for \`theme\` are optional. \`\`\`yaml preset-id: priority: 0 text: - 'Test Tooltip' - 'Price: 500{default/gem}' - '(Click to buy)' fade: fadein: 20 stay: 20 fadeout: 20 theme: default/three-line display: color: white horizontal-shift: 0 conditions: - gamemode{gm=creative} true show: reshow: false active: true cooldown: 0 actions: right-click: - 'message Hello!' \`\`\` ### Minimal Configuration \`\`\`yaml preset-id: theme: default-three-line \`\`\` ### Properties \`priority\` - Highest priority will appear first Default priority for all presets is 0. \\ Presets with a higher priority will be checked first, this is extremely useful in more complex configurations with multiple presets. #### \`text\` - Lines of text that will be displayed \`\`\`yaml text: - 'Regular text, nothing special' # PlaceholderAPI placeholder supported - '||Centered text||' # Centered text - 'Colored text' # MiniMessage format - 'Sofa price: $data(furniture.sofa.price)$' # Functions - '' # Animations \`\`\`
#### \`fade\` - Fade options, just like in titles \`\`\`yaml fade: fadein: 20 # 20 ticks = 1 second to fade in stay: 100 # 100 ticks to stay, only necessary with active: false fadeout: 40 # 40 ticks = 2 seconds to fade out \`\`\`
#### \`theme\` - The visual theme used for this preset Set to the ID of a \[Theme\](/tooltips/configuration/theme.md). This is required, otherwise preset wouldn't know what to look like. #### \`display\` Options related to how the tooltip is displayed. > \*\*\`color\` - color of the background\*\* > > You can specify the color the following ways: {% hint style="warning" %} \*\*Gradients generate a larger JSON message than regular color, so tooltips with gradients that have a large background may be laggier!\*\* {% endhint %} \`\`\`yaml color: 'white' color: '#fcba03' color: 'red:green' # gradient from red to green color: '#ffffff:#00ff19' # gradient from #ffffff to #00ff19 color: '#ffffff:#00ff19:#ffffff' # gradient from #ffffff to #00ff19 and to #ffffff again \`\`\`

color: "#ffffff-#ff0000-#ffffff"

> \`horizontal-shift\` - shift of the tooltip in pixels
horizontal-shift: 10/files/JobXIevxolhkuLh1bnph
horizontal-shift: -10/files/NRZ4P6o3eY3hb6WRQtHu
#### \`conditions\` - a list of conditions Conditions, which have to be fulfilled in often for this preset to be shown. More about conditions: {% content-ref url="/pages/vNMKF1v7jeVUve2ylZxq" %} \[Conditions\](/tooltips/configuration/preset/conditions.md) {% endcontent-ref %} #### \`show\` - defines how this preset is shown Presets can be made to be shown once or have a given cooldown. More about show properties: {% content-ref url="/pages/VR88d8jv2EZui15A83rR" %} \[Show\](/tooltips/configuration/preset/show.md) {% endcontent-ref %} #### \`actions\` - commands tied to actions Think of this as events, once they happen - a list of commands is ran. More about actions: {% content-ref url="/pages/a9mVZX7w8upQNfjPms4R" %} \[Actions\](/tooltips/configuration/preset/actions.md) {% endcontent-ref %} ## Other Properties ### File Priority You can define a priority for the entire preset file like so: \`\`\`yaml priority: 10 # At the top of the file my-preset: ... my-other-preset: ... \`\`\` This will add the given priority priorities of all presets. For example if \`my-presets\` priority is 0, it will be 10 with the file priority. This option is useful to make presets of one file more important than of another file. ### Data Data is scoped to a single preset file, and can be used by the \`$data(key)\` function in presets. This is useful to have predefined data, like furniture prices right in your preset files. You can define any sort of valid yaml data after "\`data\`". \`\`\`yaml data: # At the top of the file my-own-key: 1 debug: true prices: chair: 100 table: 50 lines: - 'Hello!' - 'My name is %placeholder%' \`\`\` ### Parenting Presets support parenting since plugin version 1.5. Parenting allows you to copy all properties from a "parent" preset into another preset and modify only the required properties. Parents and children are defined like so: \`\`\`yaml parent: content: text: - '&cThe parent!' display: theme: default-one-line child: parent: parent child-modified: parent: parent content: text: - '&aThe second child!' \`\`\` Other children can be parented as well. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types.md). # Argument Types ## \*\*Regular\*\*
NameDescriptionValue examplesConcrete examples
IntegerA real number
  • 1
  • 2
  • 1000...
  • {distance = 10}
StringRegular text. Some may support PAPI placeholders
  • hello
  • %player\_name%...
  • {first=%player\_name%}
Booleantrue or false
  • true
  • false
  • {value=true}
TypeSpecific type (clarified in the condition list)
  • creative
  • survival
  • grass\_block
  • {gm=creative}
OperationOperation to perform on two variables
  • ==
  • <=
  • >=
  • <
  • >
  • {oper= <=}
  • {o==}
LocationA location in the players current world
  • \[ x, y, z\]
  • \[ 43, 64, -43\]
  • { l = \[43, 64, -43\] }
SlotA players slotfound here
  • {slot=hand}
## \*\*Arrays\*\* Some arguments support an array of specific types. For example the \`gamemode\` condition can define multiple game modes like so: \`gamemode{gm=creative,survival}\` which will trigger the condition if the players gamemode is either creative or survival. Array options are separated with a comma " , ". It's optional to specify multiple values in an array, it can just as well consist of a single value. \`\`\`yaml conditions: # Array of game mode types - gamemode { gm = creative, survival, adventure } # Array of material types - standingon { mat = grass\_block, dirt\_block } # Array of furniture id strings - lookingatfurniture { id = table, chair } \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/argument-types.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes.md). # Notable 2.0 Changes ## 🔨 Breaking changes ### Change of ID format The identifiers of all configured objects in Tooltips have been changed. Now the identifier includes the full path to the object. For example, this is what a preset ID would look like in a folder: \`mypreset -> folder/file/mypreset\` This will require modifification all theme ID in presets to match the new format. ### Local placeholders removed Now instead of \`%furniture\_id%\` and \`%var\_key%\`, use context & variable \[Functions\](#functions). ### Furnish no longer needed Furnish was used to store price data about IDs, you can now do that using the \[$data function\](/tooltips/configuration/preset/functions.md#usddata-key). ### Hex codes broken Now instead of hex color codes, the \[MiniMessage format\](#minimessage) is used, even in preset background colors. ## ✨ New ### Functions Most important addition are furnitures. They allow to display advanced text and placeholders. Display static data from the preset file, context from conditions or conditional text. \[Functions\](/tooltips/configuration/preset/functions.md). ### Context Now, conditions are able to provide context. Context is information about the things that a condition checks. For example, for a \`lookingatfurniture\` condition, the context is the ID of the furniture. This can be accessed using \[functions\](#functions). ### Data This allows to define custom data in a preset file, which can be accessed with the \[data function\](/tooltips/configuration/preset/functions.md#usddata-key). This data can be prices of items, names of NPCs or text lines. This is a very powerful feature, which replaces Furnish. ### MiniMessage MiniMessage support, which allows for richer format in messages. However note that not all tags are included, since italic, bold and underline cannot be supported. \[Learn more about the format\](https://docs.advntr.dev/minimessage/format.html#minimessage-format). ### Animations You can now animate text inside presets. It will only work if a preset is being shown using conditions. \[Check out the animation types and format\](/tooltips/configuration/preset/animations.md). ### Optimizations Split the condition and tooltip threads. Now conditions are checked separately from sending the tooltips, which means that tooltips can be refreshed more often. ### Priorities Presets used to be checked more or less randomly. Now you can define a presets priority. The preset with the highest priority will be shown first. They can be set for \[presets\](/tooltips/configuration/preset.md#properties) and for entire \[preset file\](/tooltips/configuration/preset.md#file-priority). ### Reshow A \[reshow property\](/tooltips/configuration/preset.md#show-defines-how-this-preset-is-shown) in presets, which will redisplay the tooltip (fade in & fade out) if text changes. ### BetonQuest support BetonQuest support, \[documented here\](/tooltips/extra/integrations.md#betonquest). Tutorial on how to use it here. ### Other #### - Support for quotes in arguments \`\`\`javascript test{arg="Longer string with spaces"; arg1="another arg"} \`\`\` #### - Dynamic conditions Conditions can be registered at runtime, anytime (API related) #### - Specify custom icon width Icons can now have a custom, user-provided width. Documented on \[the icon page\](/tooltips/configuration/icon.md). --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/extra/notable-2.0-changes.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/show.md). # Show ## Introduction Once all conditions are true, it's time to decide how we want our tooltip to be shown to the player. There are currently limited amount of options, but even with the ones available interesting behaviours can be achieved. Show properties are defined inside a presets conditions like so: \`\`\`yaml preset-id: text: ... conditions: ... show: reshow: false active: true cooldown: 10 \`\`\` ## Properties ### Reshow False by default. If set to true, will fully re-show the tooltip, with fade-ins and fade-outs if text of the tooltip changes. ### Active Has a value of either \*\*true\*\* of \*\*false\*\*, which determines whether the preset is active or not. Activity here means the time for which the tooltip is shown. #### true The tooltip will be shown as long as all of the conditions are true. This is useful for example when a tooltip has to constantly be shown when looking at a block.
Preset example config \`\`\`yaml 1: text: - 'Active is' - '{+4}{+1}&atrue' theme: default/three-line conditions: conditions: - lookingatblock{type=bedrock} true show: # Is active active: true \`\`\`
{% embed url="" %} Paired with fade options
Preset example config \`\`\`yaml 1: text: - 'Active is' - '{+4}{+1}&atrue' theme: default/three-line # Fade options set here fade: fadein: 20 fadeout: 20 conditions: conditions: - lookingatblock{type=bedrock} true show: # Active active: true \`\`\`
{% embed url="" %} #### false The tooltip will be shown once using the provided fade options. If no fade options are provided, then the default stay time is 5 seconds (5 \\\* 20 ticks = 100 ticks).
Preset example config \`\`\`yaml 1: text: - 'Active is' - '{+4}&cfalse' theme: default/three-line fade: fadein: 20 stay: 20 fadeout: 20 conditions: conditions: - lookingatblock{type=bedrock} true show: # Not active active: false \`\`\`
{% embed url="" %} ### Cooldown Cooldown is a simple property that is applied to a whole preset. Once a preset has been shown once, it will go on a cooldown before being able to be shown again. This could be used to, for example remind the player every 5 minutes that they have not voted or are located in a region. The value of cooldown is an integer value of time in ticks. (1 second = 20 minecraft ticks)
Preset example config \`\`\`yaml 1: text: - 'Active is' - '{+4}{+1}&atrue' theme: default/three-line fade: fadein: 20 stay: 20 fadeout: 20 conditions: conditions: - lookingatblock{type=bedrock} true show: # Inactive, so only shows once active: false # Cooldown of 5 seconds cooldown: 100 \`\`\`
{% embed url="" %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/show.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/icon.md). # Icon {% hint style="info" %} You cannot use glyphs / images from other plugins. That's why you have to use the plugins built-in icon system. {% endhint %} Icons allow you to add your own custom textures into the tooltip text. ### Base configuration \`\`\`yaml icon-id: path: "tooltips:icon.png" ascent: 2 height: 8 width: 4 # Only use if needed \`\`\` All properties of the icon configuration are required. #### path Path to the texture of this icon inside \`.../pack\` #### ascent Vertical offset of this texture. Bigger number = higher, lower = lower. #### height Size of this texture. Preferably must be the real pixel height of the texture divided by two. ( if the texture is 16 pixels high, the \`height\` has to preferably be 8) \*\*width\*\* Overriding width, which will manually tell tooltips what it should interpet this icons width to be. ### Usage Supported in all tooltip related text. Icons can be used by entering their placeholder: \`\`\` {file/icon-id} \`\`\` ### Default icons #### Images A few default icons are included: \`\`\` /tt sendtheme Septicuss default-one-line Default icons -> {default/gem} {default/box} {default/right-click} \`\`\`
#### Spaces You can also use predefined spaces to move your text around The format is: \`{+x}\`- for positive offset and \`{-x}\` - for negative offset, where \`x\` is pixels \`\`\` /tt sendtheme Septicuss default-one-line Default icons -> {-16}{default/gem} {default/box} {default/right-click} \`\`\`
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/icon.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/animations.md). # Animations ## Usage ### Format Animations can be altered using arguments provided to them. These depend on the animation type. \`\`\`html \`\`\` ### Order All animations have an optional argument \`id\`, which defines the order in which this animation is executed. By default all animations run at once, but by specifying an \`id\`, animations will run in order. Example: \`\`\`html # This will run second # This will run third # This will run first \`\`\` ## Animations #### \`typewriter\` Typewriter animation, where each letter is typed out one-by-one. \`\`\`html \`\`\` {% embed url="" fullWidth="false" %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/animations.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/configuration/preset/functions.md). # Functions ## Usage ### Format All functions follow the following format. Arguments can also be wrapped in quotes. \`\`\`c $function(arg1, "arg2") \`\`\` Most functions can also be nested inside eachother, creating more complex behaviour. This is the main advantage of functions over placeholders. \`\`\`c $uppercase($var("pet\_name")) // Cat -> CAT \`\`\` New functions can also be added with addons using \[plugin API\](/tooltips/extra/api.md). ## Default Functions #### ⭐ \`$data(key)\` > Get data from the current preset file. See \[how to define data in presets\](/tooltips/configuration/preset.md#data). \`\`\`yaml # EXAMPLE DATA data: key: 10 prices: sword: 100 chair: 50 lines: - 'Hello!' - 'How are you?' \`\`\` \`\`\`c // Returns the value from data.key $data(key) // 10 // Returns the value from data.prices.sword $data(prices.sword) // 100 // Returns the price from data.prices. $data(prices.$context(furniture.id)) // 50 if chair // Returns the 0 indexed element in list "lines" $data(lines\[0\]) // Hello // Returns the length (size) of a list $data(lines\[length\] // 2 \`\`\` \*\*\* #### \`$hasdata(key)\` > Same as data, but returns \*true\* if given path exists and \*false\* if not. \`\`\`c $hasdata(key) // true $hasdata(fakekey) // false \`\`\` \*\*\* #### ⭐ \`$context(key)\` > Get a given key from condition context. In order for context to exist, the preset has to have this condition in its \`conditions\`. \`$context(key)\` can use similar keys to the data function. \[See which conditions return context\](/tooltips/configuration/preset/condition-list.md).\\ > \\ > (By default, all conditions also return a \`condition.\` context, which has the result of the condition (true/false) ) \`\`\`c // true if "sneaking" condition is true $context(condition.sneaking) // true if "op" condition is true $context(condition.op) // world name if "world" condition is true $context(world) // get first element from a context $context(list\[0\]) \`\`\` \*\*\* #### \`$hascontext(key)\` > Same as $context(key), but returns \*true\* if context is set and \*false\* if not. \`\`\`c // returns true if world context has been set $hascontext(world) \`\`\` \*\*\* ⭐ \`$if(condition, trueText, falseText)\` > Conditional function, which takes an evaluated statement and depending on the output displays either trueText or falseText. \`\`\`c // returns the text "True!" $if(true, "True!", "False...") // returns "You're opped!" if player is opped $if($context(condition.op), "You're opped!", "You're not opped") \`\`\` \*\*\* #### ⭐ \`$var(global, key)\` \`$pvar(global, key)\` > Variable functions allow to retrieve values from \[variables\](/tooltips/extra/variables.md) using a key. \`$var\` is used for local variables and \`$pvar\` is used for persistent (saved) variables. \`\`\`c // returns the value of the "busy" variable for current player, for ex. true $var("busy") // same as above, but persistent $pvar("busy") // returns the global and persistent "purchases" variable, for ex. 10 $pvar("global", "purchases") \`\`\` \*\*\* #### \`$parse(player, text)\` > Parses the given text for another player, instead of the player viewing the tooltip. \`\`\`c // returns "Septicuss" $parse("Septicuss", "%player\_name%") // returns the Vault balance of the target player $parse($context("lookingatplayer.name", %vault\_eco\_balance%) \`\`\` \*\*\* #### String functions \`\`\`c $lowercase("HEY") // -> "hey" $uppercase("hey") // -> "HEY" $capitalize("hey") // -> "Hey" \`\`\` #### ⭐ \`$static(text)\` > An important optimization function, which processes and caches the text within. This will stop the given text from being updated and will stay static. \`\`\`c // will display the value of the "busy" variable $static($var("busy")) \`\`\` \*\*\* #### \`$strip(text)\` > Strips the given text from all animation tags. Useful when text has to be displayed in another tooltip after an animation was done. \`\`\`c // returns "Hello!" $strip("") \`\`\` \*\*\* \`$preprocess(text)\` > Needed when importing text from elsewhere (for example using a placeholder or a function), which has animations. \`\`\`c // processes the animations of the first line defined in data $preprocess($data(lines\[0\])) \`\`\` \*\*\* Can think of some other useful function? Suggest it in the Discord! --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/configuration/preset/functions.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/extra/local-placeholders.md). # Local Placeholders This plugin supports a few local placeholders, which can be useful with displaying names of elements you're looking at. Note that these can only be used inside the Tooltips plugin. ### Currently implemented | Placeholder | | | ------------------------------ | ----------------------------------------------------------------------------------------------------------- | | %furniture\\\_id% | Id for the furniture you're currently looking at. Depends on the furniture plugin. | | %furniture\\\_name% | Display name for the furniture you're currently looking at. Depends on the furniture plugin. | | %var\\\_\\% | Returns the local player variable with the given ID. \[Variables\](/tooltips/extra/variables.md) | | %var\\\_global\\\_\\% | Returns a global variable with the given ID. \[Variables\](/tooltips/extra/variables.md) | | %persistentvar\\\_\\% | Returns the persistent (saved) player variable with the given ID. \[Variables\](/tooltips/extra/variables.md) | | %persistentvar\\\_global\\\_\\% | Returns the global persistent variables with the given ID. \[Variables\](/tooltips/extra/variables.md) |

ItemsAdder requires a namespace before the furniture id

--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/extra/local-placeholders.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/extra/integrations.md). # Integrations upported packet plugins \* packetevents \* ProtocolLib ## Supported furniture plugins \* \[MythicCrucible\](https://mythiccraft.io/index.php?resources/2) ( part of MythicMobs ) \* \[Nexo\](https://www.spigotmc.org/resources/nexo-custom-blocks-items-furniture-emotes-resourcepack-manager-1-20-4-1-21-3.121103/) \* \[ItemsAdder\](https://www.spigotmc.org/resources/73355) ## Supported region plugins \* WorldGuard ## Supported placeholder plugins Used in all tooltip text and some conditions. \* PlaceholderAPI \*\*\* ## Other ### BetonQuest #### Actions: \* \`beton-ready\` - ran when BetonQuest has provided all required information to start the next conversation step. Use this to run actions to run the next steps. #### Action commands: > These can only be used in preset actions! \* \`endconversation\` - immediately ends the current players conversation if any. \* \`nextoption\` - cycles onto the next option like 1 -> 2 -> 3 -> 1 -> ... \* \`selectoption (option)\` - select the currently picked option or provide a numeric option #### Conditions: \*\*\`betonquest\`\*\* > This condition is triggered when the player engages in a BetonQuest conversation by right-clicking an NPC. In order for this to work, a conversation has to use the option: > > \`\`\`yaml > conversationIO: tooltips > \`\`\` \*\*Context\*\* | key | value | | --------------------- | ------------------------------------------------------------------------------ | | \`betonquest.npc\` | NPC's (quester) name | | \`betonquest.text\` | Current dialogue in the conversation | | \`betonquest.options\` | A list of currently selectable options | | \`betonquest.selected\` | Number of currently selected option (changed with "\`nextoption\`" command above | ## Plugin support missing? Please make sure to contact us in our Discord server and tell us which plugin is missing! We'll be happy to add support. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/extra/integrations.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing.md). # Dynamic pricing ## Demo {% embed url="" %} Video shows how to add price to Oraxen furniture with id 'cart' {% endembed %} ## Setup Download this addon and put it in your \`plugins\` folder! \*\*PlaceholderAPI is required to use.\*\* \[CLICK TO DOWNLOAD\](https://f005.backblazeb2.com/file/septicuss/projects/tooltips/docs/furnish-0.4.jar) ## Quick Reference \*All commands require the user to be opped\* \*\*If you have ItemsAdder\*\* item or furniture, it requires a namespace in the format \`mynamespace:myitem\`, which you can see when for example giving yourself an ItemsAdder item. | Command | Description | | --------------------------- | -------------------------------- | | /furnish add \\\[id\] \\\[price\] | Adds a price for the given ID | | /furnish remove \\\[id\] | Removes a price for the given ID | | /furnish list | Lists all prices | | /furnish reload | Reload the configs | \*Placeholders require PlaceholderAPI to be supported\* | Placeholder | Description | | ----------------------- | --------------------------------- | | %furnish\\\_price\\\_\\\[ID\]% | Returns the price of the given ID | ### Example uses \*\*Displaying the price of a specific furniture\*\* \`\`\`yaml content: text: - 'This chair costs %furnish\_price\_chair%' \`\`\` \*\*Displaying the price of a furniture that is beeing looked at\*\* \`\`\`yaml content: text: - '%furniture\_name%' - 'Price: &a$%furnish\_price\_%furniture\_id%%' - '&7(Click to purchase)' \`\`\` \*\*Checking if player has more balance than what the furniture that is being looked at costs\*\* \* %vault\\\_eco\\\_balance% -> placeholder provided by the \[Vault placeholder extension\](https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#vault) to check players balance \`\`\`yaml conditions: conditions: # Check if players vault balance is greater than # or equal ( >= ) the price of a furniture - compare{ first=%vault\_eco\_balance%; oper=>=; second=%furnish\_price\_%furniture\_id%% } \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/guides/dynamic-pricing.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/guides/selling-furniture.md). # Selling furniture ## Demo {% embed url="" %} ## Initial setup 1. Download \[Vault plugin\](https://www.spigotmc.org/resources/34315) 2. Download \[Vault placeholder expansion\](https://api.extendedclip.com/expansions/vault/) (used to check if player has enough balance) 3. Download \[furnish plugin\](/tooltips/guides/dynamic-pricing.md#setup) (used for dynamic prices) 4. Download \`shop.yml\` preset file below: {% file src="/files/nw9lRVxLmIQVlA7NHl7X" %} 5. Drag \`shop.yml\` into your \`plugins/Tooltips/presets\` folder. 6. If you're using ItemsAdder, go into the \`shop.yml\` file, and inside \`main-confirm\` preset in right-click actions, replace the \`o give %player% %furniture\_id%\` action with \`iaget %player% %furniture\_id%\`
7. Run \`/tt reload\` 8. Start setting prices for funriture that you want to be sold. ## Setting prices To set a price for a furniture, use \`/furnish add \[furniture\_id\] \[price\]\`. More information \[here\](/tooltips/guides/dynamic-pricing.md#quick-reference). --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/guides/selling-furniture.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://tooltips.gitbook.io/tooltips/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://tooltips.gitbook.io/tooltips/start-here.md). # Start here Thank you for looking into the plugin! This page will go into how to set the plugin and the required dependencies up, as well as start configuring it. ### Video {% embed url="" %} Shows how to install Tooltips with Nexo (same way with ItemsAdder) {% endembed %} ### Installation 1. Download the latest version of the plugin 2. Download the required dependency \* \[ProtocolLib\](https://www.spigotmc.org/resources/1997) or \[packetevents\](https://www.spigotmc.org/resources/80279) 3. Drag the plugins into your \`plugins\` folder 4. Start or restart the server ### After restart If you're using Nexo or ItemsAdder, you can configure the plugin to automatically copy it's assets into those plugins' resource pack folders. Otherwise, use the "Without plugins" option.
Nexo Inside Tooltips 1. Go into \`config.yml\` 2. Set \`copy-resource-pack\` to \`enabled: true\` 3. Set the path to \`path: Nexo/pack/assets\` 4. Do \`/tt reload\` for Tooltips to generate its assets into Nexo 5. Do \`/nexo reload all\` to reload Nexo Repeat steps 4 and 5 anytime you update themes or icons.
ItemsAdder Inside Tooltips 1. Go into \`config.yml\` 2. Set \`copy-resource-pack\` to \`enabled: true\` 3. Set the path to \`path: ItemsAdder/contents\` 4. Do \`/tt reload\` for Tooltips to generate its assets into ItemAdder 5. Do \`/iazip\` to reload resource pack Repeat steps 4 and 5 anytime you update themes or icons.
Without plugins You will have to first \[create your own resource pack\](https://minecraft.fandom.com/wiki/Tutorials/Creating\_a\_resource\_pack#Creating\_a\_resource\_pack) (if you don't have an existing one already) and then copy the contents of \`...plugins/Tooltips/.generated\` into your resource packs \`assets\` folder. After that, host the resource pack somewhere (for example \[here\](https://mc-packs.net/) or \[here\](https://resourcepack.host/)). You will have to re-merge the resource pack after every config change related to themes or icons.
### Additional setup Some conditions require additional plugins. One notable one is PlaceholderAPI. See all of supported plugins here: {% content-ref url="/pages/9rzDVgQAP94Q8QnhvaoV" %} \[Integrations\](/tooltips/extra/integrations.md) {% endcontent-ref %} ### Next steps Check out the Features to get a map of the plugin. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://tooltips.gitbook.io/tooltips/start-here.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. ---