API

You're a developer trying to add support for DeluxeCombat? Then this is the perfect page for you!

Adding the DeluxeCombat API via Gradle / Maven

First, you have to make sure that you have added the jitpack.io repository in your build.gradle:

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>

After that, simply add the DeluxeCombatAPI library.

<dependency>
  <groupId>com.github.timderspieler</groupId>
  <artifactId>DeluxeCombat-API</artifactId>
  <version>VERISON</version>
  <scope>provided</scope>
</dependency>

The current version is:

Check if DeluxeCombat is installed

To prevent errors, we need to check if DeluxeCombat is installed.

Initializing an API object

To use the api, we need to create an API object. Its as simple as following:

Methods

Events

You can listen to these events in your plugin.

Combatlog Event

Gets fired, when a player quits a fight early.

CombatStateChange Event

Gets fired, if the combat state of a player changes (tagged and untagged).

PlayerTogglePVPEvent

Gets fired, if the player toggles their pvp.

EntityCombatlogEvent

Gets fired, if the player quits the fight early in a fight with an entity. Can be cancelled.

BountyInitiateEvent

Gets fired, if a bounty is about to get initiated. Can be cancelled.

Last updated

Was this helpful?