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
  • Add Tooltips to your plugin
  • Maven
  • Gradle
  • Using the API
  • TooltipsAPI.java static methods
  • Custom conditions
  1. Extra

API

PreviousVariablesNextCustom Conditions

Last updated 5 months ago

Add Tooltips to your plugin

Fill in the VERSION with the Tooltips version. Latest version can be found .

Also remember to add Tooltips as a dependency or soft-dependency in your plugin.yml:

depend: [Tooltips]

or

softdepend: [Tooltips]

Maven

Repository (JitPack)

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

Dependency

<dependency>
    <groupId>com.github.Septicuss</groupId>
    <artifactId>tooltips</artifactId>
    <version>VERSION</version>
    <scope>provided</scope>
</dependency>

Gradle

Repository (JitPack)

maven { url 'https://jitpack.io' }

Dependency

dependencies {
        implementation 'com.github.Septicuss:tooltips:VERSION'
}

Using the API

TooltipsAPI.java static methods

registerCondition(String name, Condition condition)
unregisterCondition(String name)
getRegisteredConditions()

sendTooltip(Player player, Preset preset)
sendTooltip(Player player, Preset preset, List<String> override)
sendTooltip(Player player, Theme theme, List<String> override)

Tooltip getTooltip(Player player, Preset preset, @Nullable List<String> override)
Tooltip getTooltip(Player player, Theme theme, @Nullable List<String> override)

boolean doesThemeExist(String id)
Theme getTheme(String id)
Set<String> getThemeIds()

boolean doesPresetExist(String id)
Preset getPreset(String id)
Set<String> getPresetIds()

Custom conditions

Learn how to create custom conditions here:

You can alternatively use the condition to compare PAPI placeholders of any custom plugin you may want to be supported.

here
Custom Conditions
compare