2 DevEvents
Andus edited this page 2024-05-28 15:43:01 +02:00

Events

Events will be made as libraries and added to code for an X amount of time. It COULD be achieved with extensions, but it would be harder to load everything from them and Extensions are deprecated.

How to create an Event Library:

  1. Make a new IntelliJ IDEA project. It needs to use Gradle

  2. Add Minestom to dependencies like so (build.gradle.kts):

dependencies {
    implementation("net.minestom:minestom-snapshots:commit_version")
}

Make sure commit version is the same as on the main server (See Server.java)

  1. Modify plugins (From java to java-library) like so (build.gradle.kts):
plugins {
    id("java-library")
}
  1. Write the actual code for the event

  2. Build the JAR

  3. Publish it to the git.andus.dev Maven Repo