Tooltips
Discord
  • Tooltips
  • Start here
  • Support
  • Plugin
    • Features
    • Commands
    • FAQ
    • Guides
      • Clearing cache
      • Furniture shop
      • BetonQuest Dialogue
      • Languages
      • Manual width
  • Configuration
    • Theme
      • Theme textures
      • Making a custom theme
    • Icon
    • Preset
      • Conditions
      • Condition list
      • Show
      • Actions
        • Commands
      • Functions
      • Animations
      • Argument Types
  • Extra
    • Notable 2.0 Changes
    • Integrations
    • Variables
    • API
      • Custom Conditions
Powered by GitBook
On this page
  • Action configuration
  • Supported actions
  • Commands
  • Examples
  1. Configuration
  2. Preset

Actions

Run commands when a tooltip is being shown.

PreviousShowNextCommands

Last updated 4 months ago

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

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

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:

Examples

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

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