> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edperks/developers/introduction.md).

# Introduction

The EdPerks API lets other plugins:

* read and modify the perk on a tool item,
* trigger rolls and query / grant Perk Tickets,
* and — most powerfully — **register a new host** so your own plugin's tools can carry EdPerks perks.

***

### Overview

EdPerks exposes a single public interface, `EdPerksAPI`, published as a singleton once the plugin has fully enabled (mirroring `EdDungeonsAPI`). Host integrations are added through the **PerkProvider SPI**, a small interface your plugin implements and registers.

The `edperks-api` artifact contains only the public types (`EdPerksAPI`, `PerkProvider`, `AppliedPerk`, `BoostStat`) — none of the implementation.

***

### Project Setup

The API is distributed as a JAR, not via a public repository — add it as a local dependency.

**Maven**

```xml
<dependencies>
    <dependency>
        <groupId>es.edwardbelt</groupId>
        <artifactId>edperks-api</artifactId>
        <version>1.0.0</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/libs/EdPerks-API.jar</systemPath>
    </dependency>
</dependencies>
```

**Gradle**

```groovy
dependencies {
    implementation files('libs/EdPerks-API.jar')
}
```

### Plugin dependency

Declare EdPerks in your `plugin.yml`. Use `softdepend` if your plugin should still load when EdPerks is absent (e.g. you register a provider opportunistically):

```yaml
name: YourPlugin
version: 1.0.0
main: com.yourplugin.Main
api-version: '1.20'
depend: [EdPerks]
# or, to load even without EdPerks:
softdepend: [EdPerks]
```

***

### Getting the API

`EdPerks` publishes the singleton at the **end** of its `onEnable`, so fetch it from your own `onEnable` (which runs after, given a `depend`) or lazily:

```java
EdPerksAPI api = EdPerksAPI.getInstance();
if (api == null) {
    getLogger().warning("EdPerks is not available.");
    return;
}
```

Continue to the [EdPerks API](/p/edperks/developers/edperks-api.md) reference and the [PerkProvider SPI](/p/edperks/developers/edperks-api/perk-provider.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edseries-plugins.gitbook.io/p/edperks/developers/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
