CustomBansPlus API - Coralise/CustomBansPlus GitHub Wiki

CBP API


First and foremost, don't forget to depend or softdepend on the CustomBansPlus plugin. To include the CBP API to your project, you simply need to add the CBP jar file (preferrably the latest version) into your libraries. If you're using maven, add the CBP jar file into your resources folder and add this to your dependencies in the pom.xml file to add the jar file as a local dependency:

    <dependency>
      <groupId>me.coralise</groupId>
      <artifactId>custombansplus</artifactId>
      <version>3.3.17</version>
      <scope>system</scope>
      <systemPath>${project.basedir}/src/main/resources/custombansplus-3.3.17.jar</systemPath>
    </dependency>

After that, you should be good to go.

To access the api itself, all you need to do is to use the static method:
CBPAPI api = CBPAPI.getApi();
This method will return the CBPAPI object if the CBP plugin is found in the server, otherwise it will return null.

⚠️ **GitHub.com Fallback** ⚠️