Preset

Presets consist of properties that define how a tooltip is shown. They are configured in the presets folder.

Base configuration

preset-id:
  text: # Optional
  - 'Test Tooltip'
  - 'Price: 500{gem}'
  - '(Click to buy)'
  fade: # Optional
    fadein: 20 # in ticks
    stay: 20 # in ticks, 100 by default
    fadeout: 20 # in ticks
  theme: default-three-line # Required
  display: # Optional
    color: white
    horizontal-shift: 0
  conditions: # Optional
  - gamemode{gm=creative} true
  show: # Optional
    active: true # Optional, true by default
    cooldown: 0 # Optional, 0 by default
  actions: # Optional
    right-click: # Optional
    - commands
  

Minimal setup:

preset-id:
  theme: default-three-line

Old base configuration (pre 1.8)

In essence, every property except for the theme is optional. This would work just fine, but at that point you're better off just sending the theme:

preset-id:
    display:
        theme: default

Properties explanation

text

A text line can be centered in the tooltip like so:

content:
  text:
  - 'Regular text, not centered'
  - '||Centered text||'

color

Gradients generate a larger JSON message than regular color, so tooltips with gradients that have a large background may be laggier!

You can specify the color the following ways:

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 

horizontal-shift

Moves the tooltip away from the center. Specified in pixels

conditions

show

actions

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:

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.

Last updated