> For the complete documentation index, see [llms.txt](https://wiki.dyroxplays.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.dyroxplays.de/perks/placeholder.md).

# Placeholder

Das Perks Plugin unterstützt vollständig **PlaceholderAPI** und bietet eine Vielzahl von Platzhaltern, um Perk-Status und Timer in anderen Plugins wie Scoreboards, Tab-Listen, Holograms und mehr anzuzeigen.

***

## Installation

{% stepper %}
{% step %}

### 1. PlaceholderAPI installieren

1. Lade [PlaceholderAPI](https://www.spigotmc.org/resources/placeholderapi.6245/) herunter
2. Platziere die `.jar` Datei im `plugins` Ordner
3. Starte den Server neu
   {% endstep %}

{% step %}

### 2. Perks Plugin installieren

Das Perks Plugin erkennt PlaceholderAPI automatisch und registriert alle Placeholders.

**Überprüfung:**

```
/papi info perks
```

**Output:**

```
Perks Expansion
Author: Dyroxplays
Version: 1.0
```

{% endstep %}
{% endstepper %}

***

## Verfügbare Placeholders

### Format

Alle Placeholders beginnen mit `%perks_` und enden mit `%`:

```
%perks_<typ>_<identifier>%
```

***

## Status-Placeholders

Status-Placeholders zeigen an, ob ein Perk aktiviert, deaktiviert oder gesperrt ist.

### Format

```
%perks_status_<PERK_NAME>%
```

### Beispiele

```
%perks_status_NO_FALL_DAMAGE%
%perks_status_FLY%
%perks_status_KEEP_INV%
%perks_status_DOUBLE_XP%
%perks_status_GARDENER_1%
```

### Ausgaben

Die Ausgabe ist in der `config.yml` konfigurierbar:

```yaml
replacementplaceholders:
  status:
    enabled: '&aAktiviert'      # Perk ist aktiv
    disabled: '&7Deaktiviert'   # Perk ist inaktiv
    blocked: '&cNicht freigeschalten'  # Keine Permission oder Welt gesperrt
```

**Beispiel-Ausgabe:**

* Perk aktiv: `&aAktiviert` → **✓ Aktiviert**
* Perk inaktiv: `&7Deaktiviert` → **✗ Deaktiviert**
* Perk gesperrt: `&cNicht freigeschalten` → **🔒 Nicht freigeschalten**

***

## Timer-Placeholders

Timer-Placeholders zeigen die verbleibende Zeit für Cooldowns an.

### Format

```
%perks_timer_<TIMER_NAME>%
```

### Verfügbare Timer

#### Gärtner-Cooldown

```
%perks_timer_GARDENER%
```

Zeigt die verbleibende Cooldown-Zeit des Gärtner-Perks an.

**Beispiel-Ausgabe:**

* Während Cooldown: `0:14` (14 Sekunden verbleibend)
* Kein Cooldown: \`\` (leer)

#### Fly-Timer

```
%perks_timer_FLY%
```

Zeigt die verbleibende Zeit des Fly-Modus an (z.B. bei Plot-based Fly).

**Beispiel-Ausgabe:**

* Während Fly aktiv: `2:30` (2 Minuten 30 Sekunden verbleibend)
* Kein Timer: \`\` (leer)

### Konfiguration

Die Anzeige der Timer ist konfigurierbar:

```yaml
replacementplaceholders:
  timer_GARDENER:
    current: '%min%:%sec%'  # Format während Cooldown läuft
    empty: ''               # Anzeige wenn kein Cooldown
  timer_FLY:
    current: '%min%:%sec%'  # Format während Timer läuft
    empty: ''               # Anzeige wenn kein Timer
```

**Custom Format-Beispiele:**

```yaml
# Mit Icons und Farben
timer_GARDENER:
  current: '⏱ &c%min%m %sec%s'
  empty: '&a✓ Bereit'

# Nur Sekunden
timer_FLY:
  current: '&e%sec%s'
  empty: '∞'

# Ausführlich
timer_GARDENER:
  current: '&7Cooldown: &c%min%:%sec%'
  empty: '&aKein Cooldown'
```

**Verfügbare Variablen:**

* `%min%` - Minuten (ohne führende Null)
* `%sec%` - Sekunden (mit führender Null, z.B. `05`)

***

## Konfigurierbare Ausgaben

Alle Placeholder-Ausgaben können vollständig angepasst werden:

### config.yml

```yaml
replacementplaceholders:
  timer_GARDENER:
    current: '%min%:%sec%'
    empty: ''
  timer_FLY:
    current: '%min%:%sec%'
    empty: ''
  status:
    enabled: '&aAktiviert'
    disabled: '&7Deaktiviert'
    blocked: '&cNicht freigeschalten'
```

### Custom Beispiele

#### Minimalistisch

```yaml
status:
  enabled: '&a✓'
  disabled: '&7✗'
  blocked: '&c🔒'
```

#### Mit Emojis

```yaml
status:
  enabled: '✅ &aAn'
  disabled: '⭕ &7Aus'
  blocked: '🔒 &cGesperrt'
```

#### Detailliert

```yaml
status:
  enabled: '&a[&l✓&a] Aktiviert'
  disabled: '&7[&l✗&7] Deaktiviert'
  blocked: '&c[&l!&c] Keine Berechtigung'
```

***

## Alle verfügbaren Perk-Placeholders

### Basis-Perks

```
%perks_status_NO_FALL_DAMAGE%
%perks_status_NO_HUNGER%
%perks_status_FLY%
%perks_status_KEEP_INV%
%perks_status_KEEP_HOTBAR%
%perks_status_KEEP_XP%
%perks_status_DOUBLE_XP%
%perks_status_QUAD_XP%
%perks_status_DROP_TO_INV%
%perks_status_EXTRA_HEARTS_5%
%perks_status_EXTRA_HEARTS_10%
%perks_status_GARDENER_1%
%perks_status_GARDENER_2%
```

### Potion-Effect Perks

Für Potion-Effekte verwendest du den Config-Key (mit Unterstrichen statt Semikolons):

**Config:**

```yaml
POTION_EFFECT_SPEED_-1_1:
  perkType: POTION_EFFECT;SPEED;-1;1
```

**Placeholder:**

```
%perks_status_POTION_EFFECT_SPEED_-1_1%
```

**Weitere Beispiele:**

```
%perks_status_POTION_EFFECT_REGENERATION_-1_1%
%perks_status_POTION_EFFECT_JUMP_-1_2%
%perks_status_POTION_EFFECT_INCREASE_DAMAGE_-1_1%
%perks_status_POTION_EFFECT_NIGHT_VISION_-1_0%
```

### Mob-Schutz Perks

```
%perks_status_NO_CREEPER_DAMAGE%
%perks_status_NO_ZOMBIE_DAMAGE%
%perks_status_NO_SKELETON_DAMAGE%
%perks_status_NO_SPIDER_DAMAGE%
%perks_status_NO_ENDERMAN_DAMAGE%
%perks_status_NO_BLAZE_DAMAGE%
%perks_status_NO_GHAST_DAMAGE%
%perks_status_NO_SLIME_DAMAGE%
%perks_status_NO_GUARDIAN_DAMAGE%
%perks_status_NO_ZOMBIFIED_PIGLIN_DAMAGE%
```

### Timer Placeholders

```
%perks_timer_GARDENER%
%perks_timer_FLY%
```

***

## Tipps & Best Practices

{% stepper %}
{% step %}

### 1. Testen von Placeholders

Verwende den PAPI-Parse Befehl zum Testen:

```
/papi parse <spieler> %perks_status_FLY%
```

{% endstep %}

{% step %}

### 2. Performance

Alle Placeholders sind optimiert und cachen Daten. Du kannst sie bedenkenlos in Scoreboards verwenden, die jede Sekunde aktualisieren.
{% endstep %}

{% step %}

### 3. Farben

Vergiss nicht, dass die Farben in der Config konfiguriert werden:

```yaml
replacementplaceholders:
  status:
    enabled: '&a✓'  # ← Hier ändern!
```

{% endstep %}

{% step %}

### 4. Debugging

Bei Problemen:

1. **Check ob PlaceholderAPI installiert ist:**

   ```
   /papi info perks
   ```
2. **Teste Placeholder direkt:**

   ```
   /papi parse <spieler> %perks_status_FLY%
   ```
3. **Check Plugin-Log:**

   ```
   [Perks] PlaceholderAPI integration enabled
   ```

{% endstep %}
{% endstepper %}

***

**Weitere Informationen:**

* [Beschreibung.md](broken://pages/bdc328c1a6001c9c58cf99f192ea914b0988952f) - Plugin-Übersicht
* [Konfiguration.md](broken://pages/1469ece7c982f482365606634f6ea8ce984e36f6) - Detaillierte Config-Anleitung
* [PerkTypes.md](broken://pages/4eca86a74fb447d25cd33f24261223541f5d7d8a) - Alle verfügbaren Perk-Typen

**Externe Links:**

* [ScoreboardPlus kaufen](https://dyroxplays.de/product/sbplus)
* [PlaceholderAPI Wiki](https://github.com/PlaceholderAPI/PlaceholderAPI/wiki)


---

# 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:

```
GET https://wiki.dyroxplays.de/perks/placeholder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
