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.
Dependency Setup
Section titled “Dependency Setup”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')}dependencies {compileOnly(files("libs/easter-eggs-x.x.x.jar"))}<dependency> <groupId>dev.despical</groupId> <artifactId>easter-eggs</artifactId> <version>LATEST</version> <scope>system</scope> <systemPath>${project.basedir}/libs/easter-eggs-x.x.x.jar</systemPath></dependency>name: YourPluginversion: 1.0.0main: your.package.Maindepend: [EasterEggs]Base Event Class
Section titled “Base Event Class”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; }}Next Steps
Section titled “Next Steps”Explore the different event categories to start building your integration: