> 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/caseopening/commands/createcmditem.md).

# createcmditem

Erstellt Items mit benutzerdefinierten Commands, die beim Rechtsklick ausgeführt werden.

**Permission:** `caseopening.createcmditem`

***

## Übersicht aller Sub-Befehle

```
/createcmditem addcmd <Command...>
/createcmditem listcmd
/createcmditem removecmd <Index> confirm
/createcmditem editcmd <Index> <Command...>
```

***

## /createcmditem addcmd \<Command...>

Fügt einen Command zum Item in deiner Hand hinzu.

{% stepper %}
{% step %}

### Schritte

1. Nimm ein Item in die Hand
2. Führe den Befehl aus
3. Der Command wird dem Item hinzugefügt
4. Bei Rechtsklick wird der Command ausgeführt
   {% endstep %}
   {% endstepper %}

Beispiele:

{% code title="Beispiele" %}

```bash
# Item geben
/createcmditem addcmd give %player% diamond 5

# Geld geben
/createcmditem addcmd eco give %player% 1000

# Rang geben
/createcmditem addcmd lp user %player% parent add vip

# Teleportieren
/createcmditem addcmd tp %player% spawn

# Case geben
/createcmditem addcmd case add legendary %player% 1

# Kristalle geben
/createcmditem addcmd add crystals %player% 500

# Nachricht senden
/createcmditem addcmd tell %player% §aGlückwunsch!

# Mehrere Commands (mehrere addcmd ausführen)
#createcmditem addcmd give %player% diamond 5
#createcmditem addcmd eco give %player% 1000
#createcmditem addcmd tell %player% §aBelohnung erhalten!
```

{% endcode %}

Platzhalter:

* `%player%` - Spielername der das Item nutzt

Hinweis: Du kannst mehrere Commands zu einem Item hinzufügen!

***

## /createcmditem listcmd

Zeigt alle Commands des Items in deiner Hand.

Verwendung:

{% code title="Verwendung" %}

```bash
# Item in Hand nehmen
/createcmditem listcmd
```

{% endcode %}

Ausgabe (für Spieler - klickbar):

```
--- Befehle für Item in Hand ---
[✎] [X] [0] give %player% diamond 5
[✎] [X] [1] eco give %player% 1000
[✎] [X] [2] tell %player% §aGlückwunsch!
```

Buttons:

* **\[✎]** = Bearbeiten (zeigt Suggest-Command)
* **\[X]** = Löschen (zeigt Bestätigung)

Ausgabe (für Console):

```
--- Befehle für Item in Hand ---
[0] give %player% diamond 5
[1] eco give %player% 1000
[2] tell %player% §aGlückwunsch!
```

***

## /createcmditem removecmd confirm

Entfernt einen Command vom Item.

{% stepper %}
{% step %}

### 1. Commands anzeigen

```bash
/createcmditem listcmd
```

{% endstep %}

{% step %}

### 2. Command entfernen

```bash
/createcmditem removecmd 0 confirm
```

{% endstep %}
{% endstepper %}

Beispiel:

{% code title="Beispiel" %}

```bash
# Zeige Commands
/createcmditem listcmd
# Ausgabe: [0] give %player% diamond 5
#          [1] eco give %player% 1000

# Entferne Command 0
/createcmditem removecmd 0 confirm

# Jetzt nur noch:
# [0] eco give %player% 1000  (Index verschoben!)
```

{% endcode %}

Hinweis: Nach dem Löschen verschieben sich die Indizes!

***

## /createcmditem editcmd \<Command...>

Bearbeitet einen bestehenden Command.

{% stepper %}
{% step %}

### 1. Aktuellen Command anzeigen

```bash
/createcmditem listcmd
```

{% endstep %}

{% step %}

### 2. Command ändern

```bash
/createcmditem editcmd 0 give %player% emerald 10
```

{% endstep %}
{% endstepper %}

Beispiel:

{% code title="Beispiel" %}

```bash
# Vorher:
/createcmditem listcmd
# [0] give %player% diamond 5

# Ändern:
/createcmditem editcmd 0 give %player% emerald 10

# Nachher:
/createcmditem listcmd
# [0] give %player% emerald 10
```

{% endcode %}

***

## Workflow: CMD-Item erstellen

### Schritt-für-Schritt Anleitung:

{% stepper %}
{% step %}

### 1. Item ins Inventory nehmen

Gib dir z.B. einen Diamanten:

```bash
/minecraft:give @s diamond 1
```

{% endstep %}

{% step %}

### 2. Commands hinzufügen

```bash
/createcmditem addcmd eco give %player% 1000
/createcmditem addcmd case add legendary %player% 1
/createcmditem addcmd crystals add %player% 500
/createcmditem addcmd tell %player% §a§lGlückwunsch! Du hast ein Reward-Item eingelöst!
```

{% endstep %}

{% step %}

### 3. Überprüfen

```bash
/createcmditem listcmd
```

{% endstep %}

{% step %}

### 4. Item umbenennen (optional)

Mit Amboss oder Command:

```bash
/minecraft:give @s diamond{display:{Name:'{"text":"§6§lReward Voucher","italic":false}'}} 1
```

{% endstep %}

{% step %}

### 5. Lore hinzufügen (optional)

```bash
/minecraft:give @s diamond{display:{Name:'{"text":"§6§lReward Voucher","italic":false}',Lore:['{"text":"§7Rechtsklick zum Einlösen","italic":false}','{"text":"§r"}','{"text":"§eBelohnungen:","italic":false}','{"text":"§7• 1000$","italic":false}','{"text":"§7• 1x Legendary Case","italic":false}','{"text":"§7• 500 Kristalle","italic":false}']}} 1
```

{% endstep %}

{% step %}

### 6. Verteilen

* Verkaufe im Shop
* Gib als Quest-Belohnung
* Nutze als Event-Reward
* Verkaufe gegen echtes Geld
  {% endstep %}
  {% endstepper %}

***

## Use Cases

### 💰 Shop-Voucher

Item: Goldbarren\
Commands:

```
Verwendung: Verkaufe für echtes Geld im Webshop
{% endcode %}

---

### 🎁 Event-Belohnung

Item: Nether Star  
Commands:
{% code %}
/createcmditem addcmd case add legendary %player% 3
/createcmditem addcmd crystals add %player% 1000
/createcmditem addcmd eco give %player% 10000
/createcmditem addcmd casebc §6%player% §7hat den §c§lEvent-Reward §7eingelöst!
```

***

### 🏆 Quest-Belohnung

Item: Diamant\
Commands:

```
Verwendung: Quest-Plugin gibt das Item als Reward
{% endcode %}

---

### 👑 Rang-Upgrade

Item: Beacon  
Commands:
{% code %}
/createcmditem addcmd lp user %player% parent add vip
/createcmditem addcmd casebc §d%player% §7ist jetzt §d§lVIP§7!
/createcmditem addcmd case add vipcase %player% 5
/createcmditem addcmd tell %player% §aWillkommen als VIP!
```

***

### 🎟️ Teleport-Ticket

Item: Paper\
Commands:

```
Verwendung: Einmal-Teleport zu speziellen Orten
{% endcode %}

---

### 🔑 Mystery-Box-Key

Item: Tripwire Hook  
Commands:
{% code %}
/createcmditem addcmd case add mystery %player% 1
/createcmditem addcmd tell %player% §eMystery Case erhalten!
```

***

## Tipps & Tricks

### 💡 Item-Design

Gutes Item:

* Eindeutiger Name (mit Farbcodes)
* Aussagekräftige Lore
* Passendes Material
* Optionale Enchantments (z.B. Glowing Effect)

Beispiel (Give-Command):

````
{% endcode %}

---

### 💡 Commands nacheinander

Commands werden in der Reihenfolge ausgeführt, wie sie hinzugefügt wurden!

Beispiel (wichtig für Logik):
```bash
# Zuerst prüfen ob genug Geld
# NICHT MÖGLICH mit createcmditem - nutze Plugins wie ConditionalCommands

# Aber Reihenfolge ist wichtig:
/createcmditem addcmd eco take %player% 1000    # Erst nehmen
/createcmditem addcmd case add starter %player% 1  # Dann geben
````


---

# 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/caseopening/commands/createcmditem.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.
