Skip to content

Developer API

The Easter Eggs API allows developers to hook into the plugin’s lifecycles, track player statistics, and modify egg behaviors. All custom events in the plugin inherit from the base EasterEggsEvent class.


To start using the API, you need to add the Easter Eggs JAR file to your project’s dependencies. Create a folder named libs in your project’s root directory and place the easter-eggs-x.x.x.jar file inside it.

dependencies {
compileOnly files('libs/easter-eggs-x.x.x.jar')
}
plugin.yml
name: YourPlugin
version: 1.0.0
main: your.package.Main
depend: [EasterEggs]

Every event provided by the Easter Eggs API extends the EasterEggsEvent class. This ensures consistent access to the user data across all interactions.

public abstract class EasterEggsEvent extends Event {
protected final User user;
public EasterEggsEvent(User user) {
this.user = user;
}
@NotNull
public final User getUser() {
return user;
}
}

Explore the different event categories to start building your integration: