The following explains how and for what the API can be used.
With the API you can hook into the plugin.
The API is mainly intended to create new Checks. The data of the User can also be modified by using the API. Otherwise, a little bit more is possible and what you make possible.
You can simply implement the API into your Addon/Plugin by:
Not much to explain here.
Just add this to your pom.xml:
Add the JitPack repository to your build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>Add the dependency (You can, if there are more versions, ofc. change the version)
<dependency>
<groupId>com.github.Luziferium</groupId>
<artifactId>Anti-Auto-Clicker</artifactId>
<version>2.6.3</version>
</dependency>Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url'https://jitpack.io' }
}
}Add the dependency
dependencies {
implementation'com.github.Luziferium:Anti-Auto-Clicker:version'
}For this purpose you will need a class:
publicclassTestCheck {
}This class we will now extend with Check:
publicclassTestCheckextendsCheck {
@Overridepublicvoidexecute(Useruser) {
// everything in here will be executed
}
}Now fill in the methods, go to your main class and register the Check in your onEnable()
@OverridepublicvoidonEnable() {
// other stuffCheckManager.registerCheck(newTestCheck());
// another other stuff
}