# Overview

GroupSecurity is an upcoming Minecraft plugin for Velocity, Spigot and Bungeecord. It has been used at MikArt Europe's Earth SMP server since December 2023.<br>

Current planned maintaining until: **December 2025**

{% hint style="success" %}
This will most likely be renewed and does not mean after 2025 there won't be updates. I have done this to show I will maintain the plugin atleast for that time, if you're hesitating on getting our plugin due to many people doing plugins on "pump & dump"
{% endhint %}

## Installation

Please choose a provider where to download the plugin

\
SpigotMC: \
BuiltByBit:\
Polymart:

After downloading the jarfile, please place the file in your servers plugin folder and start your server. A folder called `groupsecurity` should have been created in the plugins folder, you can use configuration files found in that folder to customize the GroupSecurity experience.

## Features

### Proxy support <mark style="color:yellow;">(new)</mark>

You can use this plugin on **Velocity** & **Bungeecord** (+ all their forks).

### Fabric authentication mod <mark style="color:yellow;">(new)</mark>

We have developed a new groundbreaking way to use [a fabric mod](#user-content-fn-1)[^1] to authenticate automatically using cryptographically signed keys.

[^1]: *ports for (Neo)Forge are planned*


# Security Engines

Here's all Security Engines and what they mean. Type 1 should be used since it offers best compatibility.

### Block Commands Before Login (recommended)

```yaml
# What security engine to use. Possible values are listed and explained in the documentation.
type: 1
```

This mode is most suitable for all servers since it makes the player have the group before login so the other players can see the prefix the player has.

{% hint style="info" %}
This mode blocks commands before login.
{% endhint %}

### Add group after login <mark style="color:yellow;">(new)</mark>

```yaml
# What security engine to use. Possible values are listed and explained in the documentation.
type: 2
```

This mode adds the permissions after login. If the prefix is defined in the group, it will not show up. However, it is recommended to use type 1 instead since this is made mostly to support some types of server configurations.

{% hint style="warning" %}
A permission plugin like LuckPerms is required for this mode.
{% endhint %}


# Security Modes

Information on how all the security modes work.

These are all the security modes, as in the type of login staff needs to use to access the permissions. This is not the same as the Security Engine.

### Pin

{% hint style="warning" %}
Pin codes aren't as safe as other methods if the database file is exposed, and the pin can be read in plaintext. But if someone has access to the machine, they have full access anyway. All methods in GroupSecurity are ridiculously safe anyway in player standpoint.
{% endhint %}

A pin consists of 4 digits. It can only be 4 digits, not more or less.  This mode offers really easy and fast logins.

### Password

A password can be any length wanted, any characters used. It will be securely hashed in the database. This might take a bit longer for people to login.

### 2-Factor Authentication <mark style="color:yellow;">(premium)</mark>

The safest mode of securing groups and permissions is 2-factor authentication. To use this mode you need to follow these instructions:

1. As console, or permissioned player run the command: `/gsadd`


# Commands & Permissions

Commands and permission will be listed here in the near future. *(Definitely not)*

{% tabs %}
{% tab title="First Tab" %}
Commands and permission will be listed here in the near future. *(Definitely not)*

<table><thead><tr><th width="294">Permission</th><th width="255">Description</th><th data-type="checkbox">Is default</th></tr></thead><tbody><tr><td>groupsecurity.*</td><td>Gives all permissions</td><td>false</td></tr><tr><td></td><td></td><td>false</td></tr><tr><td></td><td></td><td>true</td></tr></tbody></table>
{% endtab %}

{% tab title="Other permissions" %}
Commands and permission will be listed here in the near future. *(Definitely not)*
{% endtab %}
{% endtabs %}


# How to use the API

GroupSecurity API documentation

## 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](/api/tutorial)

[^1]: spigot\
    velocity\
    bungeecord

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


# Making an addon


# Setting up environment


# Initializing addon


# Examples


# Permission Handler

soft-dependency

If you want to use the [**Security Engine type 2**](/main/security-engines#add-group-after-login-premium) you can use these following permission plugins:

* [<mark style="color:green;">**LuckPerms**</mark>](https://luckperms.net/), this is supported the most as we include their API as a soft-dependency.
* Any Vault-based permission handler


# PacketEvents

soft-dependency

If any of the following configuration settings are set to true, this will be needed, as we need to modify player packets.&#x20;

```yaml
blockMovementWhileUnlogged: true
```


# config.yml

The configuration page has not been finished


# messages-xx.yml

The configuration page has not been finished


# commands.yml

Spigot & Velocity only


