-
Notifications
You must be signed in to change notification settings - Fork 0
API
Leonhard edited this page Aug 20, 2021
·
4 revisions
PunishControl features an API that helps you to interact with all parts of the plugin.
To use the PunishControl API you will need to have PunishControl installed. It will only be available after the plugin is enabled.
<repository>
<id>simplix</id>
<url>https://repo.simplix.dev/repository/simplixsoft-public/</url>
</repository><dependency>
<groupId>dev.simplix.plugins</groupId>
<artifactId>punishcontrol-api</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>Now you can obtain a PunishControlAPI instance
import dev.simplix.plugins.punishcontrol.PunishControlAPI;
public void obtainInstance(){
// This will throw an IllegalStateException if PunishControl is not yet initialized
PunishControlAPI.instance();
} PunishControlAPI#listPunishments PunishControlAPI#removePunishment PunishControlAPI#createPunishmentStatic method:
PunishControlAPI#registerListener© SimplixSoft.com