> For the complete documentation index, see [llms.txt](https://chatsystem-wiki.gitbook.io/chatsystem-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chatsystem-wiki.gitbook.io/chatsystem-wiki/andere-plugins/friend-system.md).

# Friend System

### 🎯 Funktionen / Features

#### Deutsch

| Funktion                       | Beschreibung                                                            |
| ------------------------------ | ----------------------------------------------------------------------- |
| **Freund hinzufügen**          | Sende eine Freundschaftsanfrage an einen anderen Spieler                |
| **Anfrage annehmen**           | Akzeptiere eine erhaltene Freundschaftsanfrage                          |
| **Anfrage ablehnen**           | Lehne eine Freundschaftsanfrage ab                                      |
| **Freund entfernen**           | Entferne einen Spieler aus der Freundesliste (auch offline)             |
| **Freundesliste**              | Zeige alle Freunde an (online oben, offline unten)                      |
| **Freundestatistiken**         | Zeige Informationen über einen Freund (Welt, Position, Leben, etc.)     |
| **Online-Benachrichtigung**    | Erhalte eine Nachricht wenn ein Freund online geht (mit Hover & Klick)  |
| **Offline-Benachrichtigung**   | Erhalte eine Nachricht wenn ein Freund offline geht (mit Hover & Klick) |
| **Anfrage-Buttons**            | Klickbare Annehmen/Ablehnen Buttons in der Chat-Nachricht               |
| **Cooldown-System**            | 30 Sekunden Cooldown zwischen Anfragen                                  |
| **Timeout-System**             | Anfragen verschwinden automatisch nach 2 Minuten                        |
| **Sound-Effekte**              | Sound bei Anfragen und Annahmen (optional)                              |
| **Maximale Freunde**           | Begrenzung pro Spieler (über Permissions einstellbar)                   |
| **Datenbank-Unterstützung**    | SQLite und MySQL werden unterstützt                                     |
| **Cache-System**               | Performance-Optimierung durch Caching                                   |
| **Vollständig konfigurierbar** | Alle Nachrichten, Sounds und Zeiten in der config.yml                   |

#### English

| Feature                  | Description                                                     |
| ------------------------ | --------------------------------------------------------------- |
| **Add friend**           | Send a friend request to another player                         |
| **Accept request**       | Accept a received friend request                                |
| **Deny request**         | Reject a friend request                                         |
| **Remove friend**        | Remove a player from your friend list (works offline too)       |
| **Friend list**          | Show all friends (online at top, offline at bottom)             |
| **Friend stats**         | Show information about a friend (world, position, health, etc.) |
| **Online notification**  | Get a message when a friend comes online (with hover & click)   |
| **Offline notification** | Get a message when a friend goes offline (with hover & click)   |
| **Request buttons**      | Clickable accept/deny buttons in the chat message               |
| **Cooldown system**      | 30 seconds cooldown between requests                            |
| **Timeout system**       | Requests automatically expire after 2 minutes                   |
| **Sound effects**        | Sounds for requests and acceptances (optional)                  |
| **Max friends limit**    | Limit per player (configurable via permissions)                 |
| **Database support**     | SQLite and MySQL are supported                                  |
| **Cache system**         | Performance optimization through caching                        |
| **Fully configurable**   | All messages, sounds and times in config.yml                    |

***

### 📖 Befehle / Commands

#### Deutsch

| Befehl                     | Alias                           | Beschreibung                        |
| -------------------------- | ------------------------------- | ----------------------------------- |
| `/friend add <Spieler>`    | `/freunde add <Spieler>`        | Sendet eine Freundschaftsanfrage    |
| `/friend accept <Spieler>` | `/freunde accept <Spieler>`     | Nimmt eine Freundschaftsanfrage an  |
| `/friend deny <Spieler>`   | `/freunde deny <Spieler>`       | Lehnt eine Freundschaftsanfrage ab  |
| `/friend remove <Spieler>` | `/freunde remove <Spieler>`     | Entfernt einen Freund aus der Liste |
| `/friend list`             | `/freunde list` oder `/friends` | Zeigt die Freundesliste an          |
| `/friend stats <Spieler>`  | `/freunde stats <Spieler>`      | Zeigt Statistiken eines Freundes    |
| `/friend help`             | `/freunde help`                 | Zeigt die Hilfe an                  |

#### English

| Command                   | Alias                         | Description                   |
| ------------------------- | ----------------------------- | ----------------------------- |
| `/friend add <player>`    | `/freunde add <player>`       | Send a friend request         |
| `/friend accept <player>` | `/freunde accept <player>`    | Accept a friend request       |
| `/friend deny <player>`   | `/freunde deny <player>`      | Deny a friend request         |
| `/friend remove <player>` | `/freunde remove <player>`    | Remove a friend from the list |
| `/friend list`            | `/freunde list` or `/friends` | Show the friend list          |
| `/friend stats <player>`  | `/freunde stats <player>`     | Show statistics of a friend   |
| `/friend help`            | `/freunde help`               | Show the help message         |

***

### 🔑 Permissions

#### Deutsch

| Permission              | Standard              | Beschreibung                           |
| ----------------------- | --------------------- | -------------------------------------- |
| `friends.use`           | `true` (alle Spieler) | Erlaubt die Nutzung des Freundesystems |
| `friends.max.50`        | `true` (alle Spieler) | Maximal 50 Freunde                     |
| `friends.max.100`       | `op`                  | Maximal 100 Freunde                    |
| `friends.max.unlimited` | `op`                  | Unbegrenzte Freunde (kein Limit)       |
| `friends.*`             | `op`                  | Alle Freunde-Berechtigungen            |

#### English

| Permission              | Default              | Description                    |
| ----------------------- | -------------------- | ------------------------------ |
| `friends.use`           | `true` (all players) | Allows using the friend system |
| `friends.max.50`        | `true` (all players) | Maximum 50 friends             |
| `friends.max.100`       | `op`                 | Maximum 100 friends            |
| `friends.max.unlimited` | `op`                 | Unlimited friends (no limit)   |
| `friends.*`             | `op`                 | All friend permissions         |

#### Permission-Hierarchie / Permission Hierarchy

text

```
friends.* (Alle Rechte / All permissions)
    ├── friends.use (Basisnutzung / Basic usage)
    └── friends.max.* (Freundeslimits / Friend limits)
        ├── friends.max.50 (50 Freunde / 50 friends)
        ├── friends.max.100 (100 Freunde / 100 friends)
        └── friends.max.unlimited (Unbegrenzt / Unlimited)
```

***

### ⚙️ Config-Optionen / Config Options

#### Deutsch

yaml

```
# Allgemeine Einstellungen
settings:
  prefix: "§8[§aFreunde§8] §7"           # Nachrichten-Prefix
  default-max-friends: 50                 # Standard max. Freunde
  request-timeout: 120                    # Timeout in Sekunden (2 Min)
  request-cooldown: 30                    # Cooldown in Sekunden
  sound-enabled: true                     # Sound aktivieren
  accept-sound: "ENTITY_PLAYER_LEVELUP"   # Sound bei Annahme
  request-sound: "ENTITY_EXPERIENCE_ORB_PICKUP"  # Sound bei Anfrage

# Datenbank-Einstellungen
database:
  type: sqlite              # sqlite oder mysql
  host: localhost           # MySQL Host
  port: 3306                # MySQL Port
  database: friendsdb       # Datenbankname
  username: root            # MySQL Benutzername
  password: ""              # MySQL Passwort
  sqlite-file: friends.db   # SQLite Dateiname

# Nachrichten (alle anpassbar)
messages:
  # Fehlernachrichten / Error messages
  no-permission: "§cDu hast keine Berechtigung!"
  player-not-found: "§cSpieler nicht gefunden!"
  # ... und viele mehr / ... and many more
```

#### English

yaml

```
# General settings
settings:
  prefix: "§8[§aFriends§8] §7"            # Message prefix
  default-max-friends: 50                 # Default max friends
  request-timeout: 120                    # Timeout in seconds (2 min)
  request-cooldown: 30                    # Cooldown in seconds
  sound-enabled: true                     # Enable sounds
  accept-sound: "ENTITY_PLAYER_LEVELUP"   # Accept sound
  request-sound: "ENTITY_EXPERIENCE_ORB_PICKUP"  # Request sound

# Database settings
database:
  type: sqlite              # sqlite or mysql
  host: localhost           # MySQL host
  port: 3306                # MySQL port
  database: friendsdb       # Database name
  username: root            # MySQL username
  password: ""              # MySQL password
  sqlite-file: friends.db   # SQLite file name

# Messages (fully customizable)
messages:
  # Error messages
  no-permission: "§cYou don't have permission!"
  player-not-found: "§cPlayer not found!"
  # ... and many more
```

***

### 🔧 Technische Details / Technical Details

#### Deutsch

| Aspekt                | Details                                  |
| --------------------- | ---------------------------------------- |
| **API-Version**       | 1.16 - 1.20                              |
| **Java-Version**      | Java 8 oder höher                        |
| **Datenbanken**       | SQLite (Standard), MySQL (optional)      |
| **Cache-Dauer**       | 1 Minute                                 |
| **Anfragen-Timeout**  | 2 Minuten (konfigurierbar)               |
| **Cooldown**          | 30 Sekunden (konfigurierbar)             |
| **Async-Operationen** | Alle Datenbankoperationen sind asynchron |
| **Thread-Sicherheit** | Vollständig thread-safe                  |

#### English

| Aspect               | Details                                  |
| -------------------- | ---------------------------------------- |
| **API version**      | 1.16 - 1.20                              |
| **Java version**     | Java 8 or higher                         |
| **Databases**        | SQLite (default), MySQL (optional)       |
| **Cache duration**   | 1 minute                                 |
| **Request timeout**  | 2 minutes (configurable)                 |
| **Cooldown**         | 30 seconds (configurable)                |
| **Async operations** | All database operations are asynchronous |
| **Thread safety**    | Fully thread-safe                        |

***

### 📊 Beispiel / Example

#### Deutsch

**Spieler A sendet eine Anfrage an Spieler B:**

text

```
[Freunde] Du hast eine Freundschaftsanfrage an §eSpielerB §agesendet!
```

**Spieler B sieht:**

text

```
[Freunde] §eSpielerA §ahat dir eine Freundschaftsanfrage gesendet! [§a✔ ANNEHMEN§7] [§c✘ ABLEHNEN§7]
```

**Nach Annahme:**

text

```
[Freunde] Du bist jetzt mit §eSpielerA §abefreundet!
[Freunde] §eSpielerB §ahat deine Freundschaftsanfrage angenommen!
```

**Wenn ein Freund online geht:**

text

```
§eSpielerA §7ist §aonline (klickbar für Statistiken)
```

#### English

**Player A sends a request to Player B:**

text

```
[Friends] You sent a friend request to §ePlayerB§a!
```

**Player B sees:**

text

```
[Friends] §ePlayerA §asent you a friend request! [§a✔ ACCEPT§7] [§c✘ DENY§7]
```

**After acceptance:**

text

```
[Friends] You are now friends with §ePlayerA§a!
[Friends] §ePlayerB §aaccepted your friend request!
```

**When a friend comes online:**

text

```
§ePlayerA §7is §aonline (clickable for stats)
```

***

### 🎵 Sound-IDs

| Sound                          | Beschreibung                          | Description |
| ------------------------------ | ------------------------------------- | ----------- |
| `ENTITY_PLAYER_LEVELUP`        | Level-Up Sound (Annahme / Acceptance) |             |
| `ENTITY_EXPERIENCE_ORB_PICKUP` | Erfahrungsorb (Anfrage / Request)     |             |
| `ENTITY_ARROW_HIT_PLAYER`      | Pfeil Treffer                         |             |
| `BLOCK_NOTE_BLOCK_PLING`       | Notenblock                            |             |
| `ENTITY_VILLAGER_YES`          | Dorfbewohner Ja                       |             |

***

### 📁 Dateien / Files

| Datei                     | Zweck            | Purpose         |
| ------------------------- | ---------------- | --------------- |
| `FriendsSystem-1.0.0.jar` | Plugin-Datei     | Plugin file     |
| `config.yml`              | Konfiguration    | Configuration   |
| `friends.db`              | SQLite Datenbank | SQLite database |
| `plugins/FriendsSystem/`  | Plugin-Ordner    | Plugin folder   |

***

### 🚀 Installation

#### Deutsch

1. Lade die `FriendsSystem-1.0.0.jar` herunter
2. Kopiere sie in den `plugins` Ordner deines Servers
3. Starte den Server neu
4. Konfiguriere die `config.yml` nach Wunsch
5. Führe `/friend help` im Spiel aus

#### English

1. Download `FriendsSystem-1.0.0.jar`
2. Copy it to your server's `plugins` folder
3. Restart the server
4. Configure `config.yml` as desired
5. Run `/friend help` in game

***

### ❓ Fehlerbehebung / Troubleshooting

#### Deutsch

| Problem                     | Lösung                                          |
| --------------------------- | ----------------------------------------------- |
| Befehle funktionieren nicht | Prüfe `plugin.yml` und Permission `friends.use` |
| Keine Nachrichten           | Prüfe die `config.yml` auf korrekte Syntax      |
| Datenbankfehler             | Prüfe Datenbank-Zugangsdaten in der Config      |
| Sound funktioniert nicht    | Stelle sicher dass `sound-enabled: true` ist    |

#### English

| Problem             | Solution                                        |
| ------------------- | ----------------------------------------------- |
| Commands don't work | Check `plugin.yml` and permission `friends.use` |
| No messages         | Check `config.yml` for correct syntax           |
| Database errors     | Check database credentials in config            |
| Sound doesn't work  | Make sure `sound-enabled: true` is set          |

<a href="/pages/JsKd452Nu8XTrHz68zaF" class="button primary" data-icon="house-chimney-window">Home</a> | <a href="https://www.spigotmc.org/resources/friend-system.134780/" class="button primary" data-icon="arrow-down-to-line">Herunterladen</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://chatsystem-wiki.gitbook.io/chatsystem-wiki/andere-plugins/friend-system.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
