Neon Addons API
  • Introduction
    • Informations
    • Ways of writing Addons
      • Java "Scripting"
      • Normal Java "Project"
  • Examples
    • Simple Chams
    • Simple ESP
    • Simple Ground Spoof Flight
    • Text Rendering
    • Sending/Intercepting Packets
    • Settings
  • The API
    • Addon API
      • AbstractNeonAddon
      • Objects
        • Events
          • NeonEvent
          • NeonPacketEvent
          • NeonPlayerMotionEvent
          • NeonPlayerMoveEvent
          • NeonPostProcessEvent
          • NeonRenderEvent
          • NeonRenderPlayerEvent
          • NeonRotationEvent
          • NeonGameTickEvent
        • Interfaces
          • INeon
          • INeonModuleManager
          • INeonModule
          • INeonSettingManager
          • INeonRenderer
          • INeonRectanglePublisher
          • INeonRoundRectanglePublisher
          • INeonMathUtil
          • INeonMovementUtil
          • INeonRotationUtil
          • INeonUnsafeFunctions
        • Other Types
          • NeonFontType
          • NeonNotificationType
          • NeonPair
          • NeonMusicMetadata
          • NeonMusicType
Powered by GitBook
On this page
  1. Introduction
  2. Ways of writing Addons

Normal Java "Project"

Example on how this method of writing addons work.

PreviousJava "Scripting"NextSimple Chams

Last updated 5 days ago

  • We recommend using a Java IDE like .

  • We recommend to use Gradle or Maven for dependency management.

Simple Example Project

In IntelliJ IDEA, create a new Gradle project by selecting the Gradle Kotlin DSL option.

Next, replace the contents of build.gradle.kts with the following:

build.gradle.kts
plugins {
    id("java")
}

group = "my.packagename"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven("https://reposilite.crunchservices.xyz/releases")
}

dependencies {
    compileOnly("com.neonclient:addons-api:1.9:all@jar")
}

java {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

Next, create a new Java class named CustomAddon under src/main/java/my/packagename, and paste the following content into it:

CustomAddon.java
package my.packagename;

import com.neonclient.api.INeon;
import com.neonclient.api.addon.AbstractNeonAddon;
import com.neonclient.api.addon.event.types.*;

public class CustomAddon extends AbstractNeonAddon {

    public CustomAddon(INeon neon) {
        super("Custom Addon", "Example Author", "A custom addon", neon);
    }

    // this makes the player float while also spoofing it's ground state
    // also print the client's username in chat
    @Override
    public void onPlayerMotionEvent(NeonPlayerMotionEvent event) {
        if (!event.isPre()) return;

        event.setOnGround(true);
        mc.thePlayer.motionY = 0.0;

        getNeon().logChat(getNeon().getUsername());
    }

}

The project structure should look similar to this:

To build a JAR file from the project, click the Gradle icon on the right side of IntelliJ IDEA and run the assemble task.

Intellij IDEA (our choice)
Intellij IDEA's New Project window