# How to use the API

## Introduction

GroupSecurity API can be used to login players and hopefully in the future to add more ways to log people in.

## Add dependency

{% tabs %}
{% tab title="maven" %}

<pre class="language-xml"><code class="lang-xml">&#x3C;repositories>
	&#x3C;repository>
		&#x3C;id>mikart&#x3C;/id>
		&#x3C;url>&#x3C;/url>
	&#x3C;/repository>
&#x3C;/repositories>
&#x3C;dependencies>
	&#x3C;dependency>
	  &#x3C;groupId>eu.mikart.groupsecurity&#x3C;/groupId>
	  &#x3C;artifactId>GroupSecurity-<a data-footnote-ref href="#user-content-fn-1">PLATFORM</a>&#x3C;/artifactId>
	  &#x3C;version><a data-footnote-ref href="#user-content-fn-2">VERSION</a>&#x3C;/version>
	&#x3C;/dependency>
&#x3C;/dependencies>
</code></pre>

{% endtab %}

{% tab title="gradle" %}

<pre class="language-gradle"><code class="lang-gradle">allprojects {
	repositories {
		...
		maven { url '' }
	}
}
dependencies {
	implementation 'eu.mikart.groupsecurity:GroupSecurity-<a data-footnote-ref href="#user-content-fn-1">PLATFORM</a>:<a data-footnote-ref href="#user-content-fn-2">VERSION</a>'
}
</code></pre>

{% endtab %}
{% endtabs %}

### Spigot & Paper

{% tabs %}
{% tab title="spigot" %}
Make GroupSecurity load before your plugin inside the plugin.yml like this:

```yaml
softdepend: [GroupSecurity]
```

{% endtab %}

{% tab title="paper" %}
Make GroupSecurity load before your plugin inside the plugin.yml like this:

```yaml
dependencies:
    server:
        GroupSecurity:
            load: BEFORE
```

{% endtab %}
{% endtabs %}

## What's next?

[Making an addon](https://groupsecurity.mikart.eu/api/tutorial)

[^1]: spigot\
    velocity\
    bungeecord

[^2]: e.g. 1.0.0-SNAPSHOT
