Preset
Presets consist of properties that define how a tooltip is shown.
Configuration
Presets are configured in the Tooltips/presets
folder. To create presets, create a new file in the folder as <name>.yml
. After that, you can start configuring presets in that file.
Configuration
All of these, except for theme
are optional.
Minimal Configuration
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
text
- Lines of text that will be displayedfade
- Fade options, just like in titles
fade
- Fade options, just like in titlestheme
- The visual theme used for this preset
theme
- The visual theme used for this presetSet to the ID of a Theme. This is required, otherwise preset wouldn't know what to look like.
display
display
Options related to how the tooltip is displayed.
color
- color of the backgroundYou 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!
horizontal-shift
- shift of the tooltip in pixels
conditions
- a list of conditions
conditions
- a list of conditionsConditions, which have to be fulfilled in often for this preset to be shown. More about conditions:
show
- defines how this preset is shown
show
- defines how this preset is shownPresets can be made to be shown once or have a given cooldown. More about show properties:
actions
- commands tied to actions
actions
- commands tied to actionsThink of this as events, once they happen - a list of commands is ran. More about actions:
Other Properties
File Priority
You can define a priority for the entire preset file like so:
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
".
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:
Other children can be parented as well.
Last updated