> For the complete documentation index, see [llms.txt](https://anhcraft.gitbook.io/oreprocessor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anhcraft.gitbook.io/oreprocessor/developer/api.md).

# API

### Dependency configuration

For typical usages, you should depend on the API jar. It contains **no** implementation.

<pre class="language-xml"><code class="lang-xml">&#x3C;repositories>
    &#x3C;repository>
<strong>        &#x3C;id>jitpack.io&#x3C;/id>
</strong>        &#x3C;url>https://jitpack.io&#x3C;/url>
    &#x3C;/repository>
&#x3C;/repositories>
</code></pre>

```xml
<dependency>
    <groupId>com.github.anhcraft.OreProcessor</groupId>
    <artifactId>oreprocessor-api</artifactId>
    <version>v1.2.3</version>
</dependency>
```

If you want to access the internal, depend on the plugin jar. Be noticed that internal code is subject to change at any time.

```xml
<dependency>
    <groupId>dev.anhcraft</groupId>
    <artifactId>oreprocessor</artifactId>
    <version>{version}</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/OreProcessor.jar</systemPath>
</dependency>
```

### API instance

The API implementation is injected at runtime. To access it:

```java
ApiProvider.getApi()
```

If you use the plugin jar, there is another way to access it internally. Remember, accessing the internal is not recommended.

```java
OreProcessor.getApi()
```

### API versions

Since v1.2.0, there are two separate versions:

* Legacy: no breaking change in API, published to JitPack, also accessible via the normal plugin jar named OreProcessor
* Custom Item API: various breaking changes across the API, not published yet, only accessible via the plugin jar named OreProcessor-CustomItem. View [Custom Items](/oreprocessor/configuration/custom-items.md) for further information.

The Custom Item API will soon be merged and become the official API. If you are developing for an existing server, consider using the legacy API. If you are planning to make a new server, consider using the new API version.

### Javadoc

Javadoc is not yet published. You can view the source of the API here as everything has been documented: <https://github.com/anhcraft/OreProcessor/tree/main/api/src/main/java/dev/anhcraft/oreprocessor/api>
