Development Setup
Maven and Gradle
Section titled “Maven and Gradle”You can add PacketEvents as a dependency using Apache Maven or Gradle (recommended). These build tools can help you build your project, which may rely on various other dependencies, with ease. If you’re new to Minecraft development, please choose a tool (we prefer Gradle) and familiarize yourself with it. We suggest you follow this guide.
Modules
Section titled “Modules”PacketEvents supports multiple Minecraft platforms, so you’ll have to specify which one you’re targeting. Here are the modules that we support:
Supported Modules
Section titled “Supported Modules”spigotvelocitybungeecordfabricsponge
Maven/Gradle Buildscript
Section titled “Maven/Gradle Buildscript”<repositories> <repository> <id>codemc-releases</id> <url>https://repo.codemc.io/repository/maven-releases/</url> </repository> <repository> <id>codemc-snapshots</id> <url>https://repo.codemc.io/repository/maven-snapshots/</url> </repository> <!-- your other repositories... --></repositories> <!-- ... --><dependencies><dependency> <groupId>com.github.retrooper</groupId> <artifactId>packetevents-INSERT_MODULE_HERE</artifactId> <version>2.11.2</version> <scope>provided</scope></dependency><!-- your other dependencies... --></dependencies>repositories { maven { url = uri("https://repo.codemc.io/repository/maven-releases/") } maven { url = uri("https://repo.codemc.io/repository/maven-snapshots/") } // your other repositories...}
dependencies { compileOnly("com.github.retrooper:packetevents-INSERT_MODULE_HERE:2.11.2") // your other dependencies...}