Skip to content

Building PacketEvents

Abhigya edited this page Nov 4, 2024 · 9 revisions

How to build PacketEvents

Building PacketEvents requires the Gradle JVM to use Java 21 due to our unit tests.
Regardless of the Gradle JVM being Java 21, PacketEvents is still written with the Java 8 SDK and will produce a JAR for Java 8.

Requirements

  • Git
  • Gradle
  • Java 21+ (for Gradle JVM)

Step 1 - Clone the repository

Clone the packetevents repository using this Git command:

git clone --branch 2.0 https://github.com/retrooper/packetevents.git

Step 2 - Build the Gradle Project using the build task

Build with this command:

./gradlew build

For building building packetevents project without Adventure api shaded in.

./gradlew build -Pno-adv