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

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

Supported actions

ActionDescription

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

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:

pageCommands

Examples

actions:
  # All right and left clicks will make the console say hi
  left-click:
  - say hi
  right-click:
  - say hi

Last updated