Setting up a workspace

In order to develop a plugin, a development workspace has to be prepared.
This guide will use the recommended setup with IntelliJ IDEA and Gradle aswell as the FearNixx nexus repository.

πŸ‘

Recommendation: Use the project template

We have a project template ready which you can use to set up your project! :D
It will always be more up to date than any Wiki can be as we will closely monitor and update the template repository whenever needed but may forget the Wiki-Page ^^
You can find the template over on Github: https://github.com/jeakfrw/plugin-template. Over there, you can also find an usage guide in the projects readMe.

(Quick setup sample at the bottom)

1. Create a new gradle project

Either:

  • Use IntelliJs "New Project" dialog to create a new gradle project
    or
  • Create a new directory for your plugin and create a new file called build.gradle inside
  • Initialize the file with defaults for Java compilation

2. Register FearNixx's Nexus repository

The artifacts for the framework are hosted on the Nexus server of FearNixx Gaming.
In order to use them, the server needs to be added to your repositories:

repositories {
  maven {
    url uri('https://nexus.fearnixx.de/repository/maven-public')
  }
}

The maven-public repository has got a mavenCentralmirror set up. So adding the Nexus server should suffice as the only repository.

Aside from maven-public you could also restrict yourself to maven-snapshots or maven-releases which not mirror mavenCentral and only contain artifact versions fitting the repository naming.
Note: At the current state of development, there's no JeakBot or confort artifact available in maven-releases as they're both still release candidates!

3. Setting up dependencies

The jeakbot-api artifact has to be added to your compile dependencies so you can use it when writing your plugin:

dependencies {
  // JeakBot API
  compile group: 'de.fearnixx', name: 'jeakbot-api', version: '1.0.4'
  
  // If your plugin uses configuration, you may find this useful:
  compile group: 'de.mlessmann', name: 'confort-api', version: '1.1.0-rc.2'
}

πŸ“˜

Note

Please always check if the versions used here are still the latest available.
Occasionally, we may be a bit late updating this in the docs. ^^

That's it! You can now use the JeakBot (and confort) API within your Java classes.
See the next pages on what you can do.


Here's an example of the full build.gradle file.

group 'de.fearnixx.jeak'
version '1.0.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = JavaVersion.VERSION_11

project.ext {
    artifact = 'channelmgmt'
}

repositories {
    maven {
        url uri('https://nexus.fearnixx.de/repository/maven-public')
    }
}

dependencies {
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
    compile group: 'de.mlessmann', name: 'confort-api', version: '1.1.0-rc.2'
    compile group: 'de.fearnixx', name: 'jeakbot-api', version: '1.0.4'
}

wrapper {
    gradleVersion '5.2.1'
}

What’s Next