Skip to content

Using the API

Setting everything up

Before starting to use the API, you will have to add the myth-MC releases repository and the dependency to your project:

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

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

Now you can get the Social instance by using the Social class:

Social social = Social.get();

This instance provides access to every function in the plugin.

Note

Using the API requires some basic knowledge of the Adventure library. If you haven't used Adventure before, we recommend having a look at their docs.