# API

The PrivateChats API is a work-in-progress.&#x20;

### Setup

{% tabs %}
{% tab title="Manual Setup" %}
1\. Download the latest API release from [the repo](https://repo.ryanmood.me/#/releases/me/ryanmood/PrivateChatsAPI/).

2\. Add the API jar as a dependency in your projects.

3\. Don't package or shade the API into your plugin jar, it must remain seperate. PrivateChats includes the API.

4\. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.

5\. The API is now ready to be used in your project.
{% endtab %}

{% tab title="Maven Setup" %}

1. Add the repository to your pom.xml

```xml
<repository>
  <id>ryanmood-repo</id>
  <url>https://repo.ryanmood.me/releases</url>
</repository>
```

2. Add the dependency to your pom.xml, ensuring that `<scope>` is always `provided`.

```xml
<dependency>
  <groupId>me.ryanmood</groupId>
  <artifactId>PrivateChatsAPI</artifactId>
  <version>BETA-0.1</version>
  <scope>provided</scope>
</dependency>
```

3. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.
4. The API is now ready to be used.
   {% endtab %}

{% tab title="Gradle Setup" %}

1. Add the repository:

```gradle
repositories {
    mavenCentral()
    maven("https://repo.ryanmood.me/releases/")
}
```

2. Add the dependency (compileOnly is required to ensure that the API isn't packaged into your plugin):

```gradle
dependencies {
    implementation("me.ryanmood", "PrivateChatsAPI", "BETA-0.1", "compileOnly")
}
```

3. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.
4. Ensure that PrivateChat's package is excluded from any shading plugins.
5. The API is now ready to be used.
   {% endtab %}
   {% endtabs %}

{% embed url="<https://repo.ryanmood.me/javadoc/releases/me/ryanmood/PrivateChatsAPI/BETA-0.1>" %}
Java Docs for the API.
{% endembed %}

{% embed url="<https://github.com/RyanMoodGAMING/PrivateChatsAPI>" %}
GitHub Repository for the API
{% endembed %}

{% embed url="<https://repo.ryanmood.me/#/releases/me/ryanmood/PrivateChatsAPI>" %}
The Repo for the API.
{% endembed %}
