DeathChest
ExpDrop
  • Death Chest
  • Documentation
  • Installation
  • Permissions
  • Features
    • Claim Protections
    • Block break animation
    • Particle animation
    • Holograms
    • Inventory
    • Experience points convertation
    • Expiration
    • Player notification
    • Global notification
    • Change death message
    • World filter
    • Blast protection
    • Thief Protection
    • PlaceHolder API
    • Duration Format
  • ❓FAQ
  • API
    • Get started
    • Events
  • Control Flow
    • Spawn chest control flow
Powered by GitBook
On this page
  • Dependency
  • Maven
  • Gradle Groovy
  • Gradle Kotlin
  • Integration
  • Add it as a dependency
  • Use it in your plugin
  1. API

Get started

PreviousFAQNextEvents

Last updated 5 months ago

Dependency

Maven

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

Add the dependency

<dependency>
    <groupId>com.github.DevCyntrix</groupId>
    <artifactId>death-chest</artifactId>
    <version>Tag</version>
</dependency>

Gradle Groovy

repositories {
  maven { url "https://jitpack.io" }
}

Add the dependency

dependencies {
        compileOnly "com.github.DevCyntrix:death-chest:NEWEST-VERSION"
}

Gradle Kotlin

repositories {
    maven("https://jitpack.io")
}

Add the dependency

dependencies {
    compileOnly("com.github.DevCyntrix:death-chest:NEWEST-VERSION")
}

Integration

You should add the plugin to your dependency list of your plugin.

Add it as a dependency

plugin.yml
name: ...
version: ...
authors:
  - ...
  - ...
...
depend:
  - DeathChest

Use it in your plugin

public class TestPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        DeathChestService load = getServer().getServicesManager().load(DeathChestService.class);
        if (load != null) {
            DeathChest chest = load.createDeathChest(location, items); // This creates a new chest with the items in the world
        }
    }

}