Package group.worldstandard.pudel.api.annotation


package group.worldstandard.pudel.api.annotation
Annotations for declaring plugin metadata, commands, and event handlers.

This package contains all annotations used to declaratively define plugin behavior. Using annotations is the preferred approach for plugin development as it simplifies registration and lifecycle management.

Plugin Declaration:

  • Plugin - Marks a class as a plugin

Command Annotations:

Interaction Handler Annotations:

Lifecycle Annotations:

Example Usage:

@Plugin(name = "MyPlugin", version = "1.0.0", author = "Author")
public class MyPlugin {

    @OnEnable
    public void onEnable(PluginContext context) {
        // Plugin initialization
    }

    @SlashCommand(name = "ping", description = "Check latency")
    public void ping(SlashCommandInteractionEvent event) {
        event.reply("Pong!").queue();
    }
}
Since:
2.3.0
  • Annotation Interfaces
    Class
    Description
    Marks a method as a button interaction handler.
    Defines a choice for command options.
    Defines a command option for slash commands.
    Marks a method as a context menu handler.
    Marks a method as a modal submission handler.
    Marks a method to be called when the plugin is disabled.
    Marks a method to be called when the plugin is enabled.
    Marks a method to be called when the plugin is being unloaded/shutdown.
    Marks a class as a Pudel plugin.
    Marks a method as a select menu handler.
    Marks a method as a slash command handler.
    Defines a subcommand for slash commands.
    Marks a method as a text command handler.