> 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/sharexp-system.md).

# ShareXP System

### 🇩🇪 DEUTSCH

### 📋 Allgemeine Beschreibung

ShareXP ist ein Paper 1.21+ Plugin, das es Spielern ermöglicht, ihre Erfahrungslevel mit anderen Spielern zu teilen – auch wenn diese offline sind. Das Plugin verwendet ein exaktes XP-Transfer-System, das jeglichen XP-Glitch verhindert. Zusätzlich enthält es automatische Lore-Fixing-Funktionen, um doppelte Item-Beschreibungen zu entfernen.

***

### 🔧 Hauptfunktionen

| Funktion                        | Beschreibung                                                     |
| ------------------------------- | ---------------------------------------------------------------- |
| **Level-Transfer**              | Übertrage Level von einem Spieler zu einem anderen               |
| **Offline-Support**             | Level können auch an offline Spieler gesendet werden             |
| **Exakter XP-Transfer**         | Verwendet Minecrafts XP-Formel für 1:1 Transfer ohne Glitching   |
| **Join-Benachrichtigung**       | Offline-Spieler erhalten beim Einloggen ihre ausstehenden Level  |
| **Automatisches Lore-Fixing**   | Entfernt doppelte Lore-Nachrichten von allen Items               |
| **Konfigurierbare Nachrichten** | Alle Nachrichten können in der config.yml angepasst werden       |
| **Tab-Completion**              | Automatische Vorschläge für Spieler (online & offline) und Level |

***

### 📁 Konfigurationsdatei (config.yml)

yaml

```
# Einstellungen
settings:
  share-to-offline: true  # true = offline Spieler können Level erhalten

# Nachrichten (alle anpassbar mit & Farbcodes)
messages:
  prefix: "&8[&6ShareXP&8] &r"
  usage: "&cVerwendung: &7/sharelevel <Spieler> <Anzahl>"
  no-permission: "&cDu hast keine Berechtigung für diesen Befehl!"
  player-not-found: "&cDer Spieler &7%player% &cwurde nicht gefunden!"
  invalid-amount: "&cBitte gib eine gültige Anzahl an Leveln an (mindestens 1)!"
  not-enough-levels: "&cDu hast nicht genug Level! Du hast nur &7%levels% &cLevel."
  cannot-share-to-self: "&cDu kannst dir selbst keine Level geben!"
  share-success-sender: "&aDu hast &7%amount% &aLevel an &7%player% &agegeben. Dir bleiben &7%remaining% &aLevel."
  share-success-target-online: "&aDu hast &7%amount% &aLevel von &7%sender% &aerhalten!"
  share-success-target-offline: "&aDu hast &7%amount% &aLevel an &7%player% &agesendet. Er/sie erhält die Level beim nächsten Einloggen."
  share-received-on-join: "&aDu hast &7%amount% &aLevel von &7%sender% &aerhalten, während du offline warst!"
  offline-sharing-disabled: "&cDas Versenden von Leveln an offline Spieler ist deaktiviert!"
```

#### Platzhalter für Nachrichten:

* `%player%` - Spielername des Empfängers
* `%sender%` - Spielername des Senders
* `%amount%` - Anzahl der transferierten Level
* `%remaining%` - Verbleibende Level des Senders
* `%levels%` - Aktuelle Level des Spielers

***

### 🎮 Befehle

| Befehl                           | Aliase            | Beschreibung                                                               |
| -------------------------------- | ----------------- | -------------------------------------------------------------------------- |
| `/sharelevel <Spieler> <Anzahl>` | `/sl`, `/sharexp` | Sendet die angegebene Anzahl an Level an den Spieler (online oder offline) |
| `/sharelevel fixlore`            | -                 | Entfernt doppelte Lore-Nachrichten aus deinem Inventar                     |
| `/sharelevel fixlore all`        | -                 | Entfernt doppelte Lore-Nachrichten aus allen Inventaren (OP nur)           |

#### Beispiele:

bash

```
/sharelevel Rocky_QDH 5        # Sendet 5 Level an Rocky_QDH
/sl Steve 3                    # Sendet 3 Level an Steve (Alias)
/sharexp Alex 2                # Sendet 2 Level an Alex (Alias)
/sharelevel fixlore            # Fixiert dein eigenes Inventar
/sharelevel fixlore all        # Fixiert alle Inventare
```

***

### 🔐 Berechtigungen (Permissions)

| Permission               | Standard              | Beschreibung                                                      |
| ------------------------ | --------------------- | ----------------------------------------------------------------- |
| `sharelevel.use`         | `true` (Alle)         | Erlaubt die Nutzung des `/sharelevel` Befehls                     |
| `sharelevel.fixlore`     | `true` (Alle)         | Erlaubt das Fixen des eigenen Inventars mit `/sharelevel fixlore` |
| `sharelevel.fixlore.all` | `op` (Nur Operatoren) | Erlaubt das Fixen aller Inventare mit `/sharelevel fixlore all`   |

***

### 🧠 XP-Formel (Minecraft 1.21)

Das Plugin verwendet die exakte Minecraft XP-Formel:

| Level-Bereich | XP pro Level-Up |
| ------------- | --------------- |
| 0-15          | 2 × Level + 7   |
| 16-30         | 5 × Level - 38  |
| 31+           | 9 × Level - 158 |

**Wichtig:** Der XP-Transfer ist exakt und nicht-linear. 5 Level von Level 30-35 erfordern mehr XP als 5 Level von Level 0-5. Das Plugin berechnet die genaue XP-Menge, sodass kein XP generiert oder verloren geht.

***

### 📂 Dateien

| Datei                | Beschreibung                                              |
| -------------------- | --------------------------------------------------------- |
| `config.yml`         | Hauptkonfiguration mit Nachrichten und Einstellungen      |
| `offline_levels.yml` | Speichert ausstehende Level-Transfers für offline Spieler |

***

### 🛠️ Lore-Fixing Funktion

Das Plugin enthält einen automatischen Lore-Fixer, der:

* Doppelte Lore-Nachrichten erkennt (z.B. "Craftet by Rocky\_QDH" und "Craftet von Rocky\_QDH")
* Automatisch Duplikate entfernt
* Bei jedem Inventar-Event (Öffnen, Klicken, Aufnehmen) aktiv ist
* Alle 5 Sekunden alle Inventare scannt
* Auch bereits existierende Items auf dem Server fixiert

***

### 🚀 Installation

1. Lade die `ShareXP.jar` herunter
2. Kopiere sie in den `plugins/` Ordner deines Paper 1.21+ Servers
3. Starte den Server neu
4. Die `config.yml` wird automatisch erstellt
5. Passe Nachrichten nach Wunsch an und führe `/reload` aus (oder neustarten)

***

### ❓ Fehlerbehebung

| Problem                         | Lösung                                                         |
| ------------------------------- | -------------------------------------------------------------- |
| Befehl nicht gefunden           | Stelle sicher, dass die plugin.yml den Befehl enthält          |
| Spieler nicht im Tab-Completer  | Der Spieler muss mindestens einmal auf dem Server gewesen sein |
| Level werden nicht transferiert | Prüfe die `offline_levels.yml` auf Fehler                      |
| Doppelte Lore bleiben           | Führe `/sharelevel fixlore` manuell aus                        |

***

### 📝 Changelog

**Version 1.0.0**

* ✅ Level-Transfer zwischen Spielern
* ✅ Offline-Level-Sharing
* ✅ Exakter XP-Transfer (kein Glitching)
* ✅ Automatisches Lore-Fixing
* ✅ Konfigurierbare Nachrichten
* ✅ Tab-Completion für online & offline Spieler
* ✅ Join-Benachrichtigungen für ausstehende Level

### 🇬🇧 ENGLISH

## ShareXP Plugin Documentation

### 📋 General Description

ShareXP is a Paper 1.21+ plugin that allows players to share their experience levels with other players – even when they are offline. The plugin uses an exact XP transfer system that prevents any XP glitching. It also includes automatic lore fixing features to remove duplicate item descriptions.

***

### 🔧 Main Features

| Feature                   | Description                                                     |
| ------------------------- | --------------------------------------------------------------- |
| **Level Transfer**        | Transfer levels from one player to another                      |
| **Offline Support**       | Levels can be sent to offline players                           |
| **Exact XP Transfer**     | Uses Minecraft's XP formula for 1:1 transfer without glitching  |
| **Join Notification**     | Offline players receive their pending levels when logging in    |
| **Automatic Lore Fixing** | Removes duplicate lore messages from all items                  |
| **Configurable Messages** | All messages can be customized in config.yml                    |
| **Tab Completion**        | Automatic suggestions for players (online & offline) and levels |

***

### 📁 Configuration File (config.yml)

yaml

```
# Settings
settings:
  share-to-offline: true  # true = offline players can receive levels

# Messages (all customizable with & color codes)
messages:
  prefix: "&8[&6ShareXP&8] &r"
  usage: "&cUsage: &7/sharelevel <player> <amount>"
  no-permission: "&cYou don't have permission to use this command!"
  player-not-found: "&cPlayer &7%player% &cnot found!"
  invalid-amount: "&cPlease enter a valid amount of levels (minimum 1)!"
  not-enough-levels: "&cYou don't have enough levels! You only have &7%levels% &clevels."
  cannot-share-to-self: "&cYou cannot give levels to yourself!"
  share-success-sender: "&aYou gave &7%amount% &alevels to &7%player%&a. You have &7%remaining% &alevels left."
  share-success-target-online: "&aYou received &7%amount% &alevels from &7%sender%&a!"
  share-success-target-offline: "&aYou sent &7%amount% &alevels to &7%player%&a. They will receive them when they log in."
  share-received-on-join: "&aYou received &7%amount% &alevels from &7%sender% &awhile you were offline!"
  offline-sharing-disabled: "&cSending levels to offline players is disabled!"
```

#### Message Placeholders:

* `%player%` - Recipient player name
* `%sender%` - Sender player name
* `%amount%` - Number of transferred levels
* `%remaining%` - Sender's remaining levels
* `%levels%` - Player's current levels

***

### 🎮 Commands

| Command                         | Aliases           | Description                                                            |
| ------------------------------- | ----------------- | ---------------------------------------------------------------------- |
| `/sharelevel <player> <amount>` | `/sl`, `/sharexp` | Sends the specified amount of levels to the player (online or offline) |
| `/sharelevel fixlore`           | -                 | Removes duplicate lore messages from your inventory                    |
| `/sharelevel fixlore all`       | -                 | Removes duplicate lore messages from all inventories (OP only)         |

#### Examples:

bash

```
/sharelevel Rocky_QDH 5        # Sends 5 levels to Rocky_QDH
/sl Steve 3                    # Sends 3 levels to Steve (alias)
/sharexp Alex 2                # Sends 2 levels to Alex (alias)
/sharelevel fixlore            # Fixes your own inventory
/sharelevel fixlore all        # Fixes all inventories
```

***

### 🔐 Permissions

| Permission               | Default               | Description                                                  |
| ------------------------ | --------------------- | ------------------------------------------------------------ |
| `sharelevel.use`         | `true` (Everyone)     | Allows using the `/sharelevel` command                       |
| `sharelevel.fixlore`     | `true` (Everyone)     | Allows fixing your own inventory with `/sharelevel fixlore`  |
| `sharelevel.fixlore.all` | `op` (Operators only) | Allows fixing all inventories with `/sharelevel fixlore all` |

***

### 🧠 XP Formula (Minecraft 1.21)

The plugin uses the exact Minecraft XP formula:

| Level Range | XP per Level-Up |
| ----------- | --------------- |
| 0-15        | 2 × level + 7   |
| 16-30       | 5 × level - 38  |
| 31+         | 9 × level - 158 |

**Important:** The XP transfer is exact and non-linear. 5 levels from level 30-35 require more XP than 5 levels from level 0-5. The plugin calculates the exact XP amount so no XP is generated or lost.

***

### 📂 Files

| File                 | Description                                        |
| -------------------- | -------------------------------------------------- |
| `config.yml`         | Main configuration with messages and settings      |
| `offline_levels.yml` | Stores pending level transfers for offline players |

***

### 🛠️ Lore Fixing Function

The plugin includes an automatic lore fixer that:

* Detects duplicate lore messages (e.g., "Craftet by Rocky\_QDH" and "Craftet von Rocky\_QDH")
* Automatically removes duplicates
* Activates on every inventory event (open, click, pickup)
* Scans all inventories every 5 seconds
* Also fixes already existing items on the server

***

### 🚀 Installation

1. Download the `ShareXP.jar` file
2. Copy it to the `plugins/` folder of your Paper 1.21+ server
3. Restart the server
4. The `config.yml` will be created automatically
5. Customize messages as desired and run `/reload` (or restart)

***

### ❓ Troubleshooting

| Problem                     | Solution                                              |
| --------------------------- | ----------------------------------------------------- |
| Command not found           | Make sure the plugin.yml contains the command         |
| Player not in tab completer | The player must have been on the server at least once |
| Levels not transferring     | Check `offline_levels.yml` for errors                 |
| Duplicate lore remains      | Run `/sharelevel fixlore` manually                    |

***

### 📝 Changelog

**Version 1.0.0**

* ✅ Level transfer between players
* ✅ Offline level sharing
* ✅ Exact XP transfer (no glitching)
* ✅ Automatic lore fixing
* ✅ Configurable messages
* ✅ Tab completion for online & offline players
* ✅ Join notifications for pending levels

<a href="/pages/JsKd452Nu8XTrHz68zaF" class="button primary" data-icon="house-chimney-window">Home</a> |  <a href="https://www.spigotmc.org/resources/sharexp.134183/" 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/sharexp-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.
