Skip to main content
SentryPremades exposes a lightweight, yet extremely capable API that allows developers to deeply integrate with the premades framework. You can trigger abilities, fetch registered premades, and even dynamically register your own abilities directly from your Java or Kotlin plugins.

Setup

Ensure that you have SentryPremades in your plugin’s depend or softdepend list in your plugin.yml.
plugin.yml

Triggering Premades

The plugin provides a central SentryPremadesAPI object with static methods to execute premades seamlessly.

Executing Abilities

To execute an ability, provide the ability’s ID and the target Entity. You can optionally provide a specific Location.

Executing Events

Events operate independently of a specific entity, typically affecting the environment.
Important: If you specify a preset ID (e.g., flaming-shot:low-damage), ensure the preset ID is included exactly as formulated when calling the API!

Programmatic Registration

While SentryPremades allows bundling addons into .jar files (see Custom Addons), you can also register abilities directly from your own plugin’s code without writing a premade.yml. To do this, interact directly with the PremadeRegistry!

Registering an Ability

Auto-Registering Bukkit Listeners

When developing complex abilities, you’ll often need to listen to Bukkit events. SentryPremades makes this incredibly simple. If your custom Ability or Event class implements org.bukkit.event.Listener, the PremadeRegistry will automatically register your event handlers when the ability is loaded, and automatically unregister them when the plugin reloads or the ability is removed!

Querying the Registry

You can also retrieve all currently registered premades to build your own GUIs, tools, or integrations dynamically.
Last modified on June 28, 2026