Setup
To use the Lynx API in your project, we first need to import this into the project.
Here is a list of all the current modules:
| Module Name | Version | 
|---|---|
| display | 1.19.4+ | 
| event | 1.13+ | 
| items | 1.13+ | 
| logger | 1.13+ | 
| npc | 1.13+ | 
| playerMeta | 1.13+ | 
| scheduler | 1.13+ | 
| scoreboard | 1.13+ | 
| tab | 1.13+ | 
Accessing the API
First add the repository:
maven {
    name = "undefined-repo"
    url = "https://repo.undefinedcreations.com/releases"
}Lynx snapshots are version that aren't fully done and are created for testing uses.
maven {
    name = "undefined-snapshots"
    url = "https://repo.undefinedcreations.com/snapshots"
}Then add the library to your dependencies:
This will automatically import all lynx modules
compile 'com.undefined:lynx:(latest version)' // or implementation if shadowingImporting Specific Module
Lynx will also allow you to import a specific modules instead of all of them.
Doing this you will first have to import the core module:
compile 'com.undefined:lynx:(latest version):core' // or implementation if shadowingNow you can choose a specific module to import by replace (module name) with the correct module name:
compile 'com.undefined:lynx:(latest version):(module name)' // or implementation if shadowingUsing Lynx
To actually use Lynx, you have two options:
- Adding the plugin on your server
 - Shadowing the dependency.
 
Adding the plugin to your server
Another option is to add the Lynx plugin to your server. This is a good option for when you have multiple plugins that use Lynx. You can get the latest JAR from the GitHub releases: https://github.com/UndefinedCreations/Lynx/releases.
Shadowing the dependency
Shadowing means that you lynx will be included in the built JAR. If you use Gradle, it's suggested to use the gradleup shadow plugin, and if you are using Maven it's suggested to use the maven shade plugin.
Important
You should modify your Gradle dependency to implementation instead of compile/compileOnly and remove the scope block from your Maven dependency.
Using Java
When coding you will need to import kotlin. You can do this by adding the kotlin plugin:
id 'org.jetbrains.kotlin.jvm' version "2.2.0"