Skip to content

Event manager API for Spigot plugins. Register only one bukkit listener per event, but run as many method per event as you want.

License

Notifications You must be signed in to change notification settings

frengor/EventManagerAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventManagerAPI

Build Status

Event manager API for Spigot plugins. Register only one bukkit listener per event, but run as many method per event as you want.

JavaDoc: https://frengor.com/javadocs/EventManagerAPI/build-server/

Get it with maven:

<repositories>
    <repository>
        <id>fren_gor</id>
        <url>https://nexus.frengor.com/repository/public/</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.frengor</groupId>
    <artifactId>eventmanagerapi</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>compile</scope>
</dependency>

Usage

EventManager api = new EventManager(plugin);
Object listener = ... // This can be whatever object you want

// Send a welcome message to the players when they join
api.register(listener, PlayerJoinEvent.class, event -> event.getPlayer().sendMessage("Welcome to our server!"));

// Modify the welcome message
// Note that the event is registered with HIGH priority
api.register(listener, PlayerJoinEvent.class, EventPriority.HIGH, event -> event.setJoinMessage("A player has joined the server!"));

// Disable the API
api.disable();

About

Event manager API for Spigot plugins. Register only one bukkit listener per event, but run as many method per event as you want.

Topics

Resources

License

Stars

Watchers

Forks

Languages