Skip to content

Using the API

Setting everything up

Before using the API, you must add the myth-MC releases repository and the required dependencies to your project.

Maven repository

Add the following repository to your pom.xml:

<repositories>
    <repository>
        <id>myth-MC-releases</id>
        <url>https://repo.mythmc.ovh/releases/</url>
    </repository>
</repositories>

Dependencies

Next, add the social-api dependencies:

<dependencies>
    <dependency>
        <groupId>ovh.mythmc</groupId>
        <artifactId>social-api</artifactId>
        <version>VERSION</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>ovh.mythmc</groupId>
        <artifactId>social-api-bukkit</artifactId>
        <version>VERSION</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Accessing the API

Once the dependency is added, you can obtain the Social instance using:

Social social = Social.get();

This instance acts as the entry point to the API, providing access to all major systems, including:

Note

Using the API requires basic knowledge of the Adventure library. If you are not familiar with Adventure, consult the official documentation.