# ⚙️ Items | Custom Items

## Items

{% hint style="info" %}
In this section you won't be able to add new items to the menu, only edit the current ones.\
If you want to add more items use the [custom-items](#custom-items) section
{% endhint %}

### Item | Material

* Material name (`DIAMOND`).
* [BaseHead](https://minecraft-heads.com/) (`basehead-base64`).
* Minecraft Texture (`texture-<id>`) - The `id` is what's after `https://textures.minecraft.net/textures/`
* [HeadDatabase](https://www.spigotmc.org/resources/14280/) (`hdb-<ID>`).
* [ItemsAdder](https://www.spigotmc.org/resources/%E2%9C%A8itemsadder%E2%AD%90emotes-mobs-items-armors-hud-gui-emojis-blocks-wings-hats-liquids.73355/) material (`itemsadder-namespace:name`)
* [Oraxen](https://www.spigotmc.org/resources/72448/) material (`oraxen-oraxen_item_id`)
* [BreweryX](https://www.spigotmc.org/resources/breweryx.114777/) material (`brewery-<brewName>:<quality>`)
* [ExecutableBlocks](https://www.spigotmc.org/resources/%E2%AD%90-executable-blocks-%E2%AD%90-add-activators-on-your-blocks.94696/) material (`executableblocks-id`)
* [ExecutableItems](https://www.spigotmc.org/resources/%E2%9A%94%EF%B8%8Fexecutableitems-%E2%AD%90-customize-all-items-add-abilities-%E2%AD%90-ai-items-generation-on-the-discord-%E2%9C%85.83070/updates) material (`executableitems-id`)
* [MMOItems](https://www.spigotmc.org/resources/mmoitems.39267/) material (`mmo-<type>:<id>`)
* [MythicMobs](https://mythiccraft.io/index.php?ewr-porta/) material (`mythicmobs-id`)
* [QualityArmory](https://www.spigotmc.org/resources/quality-armory.47561/) material (`qualityarmory-id`)

**Supported material values:**

<pre class="language-yaml"><code class="lang-yaml"><strong>material: TEXT
</strong></code></pre>

### Item | ItemFlags

There is an item\_flags: section where you can add the necessary flags for your item.

```yaml
item_flags:
  - HIDE_ATTRIBUTES
```

## Custom Items

In this section you will be able to create your customized items. Each item you add in this section must have a different name.

{% hint style="info" %}
Remember that to execute an action, you can read [Actions](#basic-commands) to find out which one you need.\
For more information you can read [❔ FAQ](/general/faq.md)
{% endhint %}

### Section

For the custom items section, you will need to create a name identifier for the item, as shown in the following example: 'close'.

```yaml
    custom-items:
      close:  # <-- Name ID
        material: BOOK
        amount: 1
        display_name: '&cClose'
        lore: [ ]
        slot: 49
        actions:
          - "[close]"
```

***

### Slots

In this section, you can specify in which slots the articles will be created. Below are some examples of how to assign articles to different slots:

```yaml
slot: 10 # <--  The item is created in slot 10
slots: [1-10] # <-- Create the item in slots 1 to 10
slots: # <-- Create the item in slots 1, 2 and 3
- 1
- 2
- 3
```

You can use these formats to customize item locations according to your needs.

***

### Actions

Actions allow you to execute console commands, send messages, send titles, send messages in the bossbar and even use mini message

{% hint style="info" %}
Remember that you can use placeholders in any action. For example `%player_name%`.
{% endhint %}

| Prefix            | Description                                                                                                                                                       |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[message]`       | If the prefix is \[message] and the player is not in parkour (or is a new player), a message is sent to the player.                                               |
| `[command]`       | If the prefix is \[command] and the player is not in parkour, a server command is executed. You can use placeholder like %player\_name% to get the player's name  |
| `[player]`        | If the prefix is \[player] and the player is not in parkour, a chat action is performed for the player                                                            |
| `[sound]`         | Send a sound to the player, add volume, pitch using ;                                                                                                             |
| `[broadcast]`     | Send a global message, to all connected players                                                                                                                   |
| `[close]`         | Close the player's inventory                                                                                                                                      |
| `[openmenu]`      | You will be able to open an inventory menu using its section name in menus.yml                                                                                    |
| `[title]`         | Uses the format Title;Subtitle;fadeint;stay;fadeout                                                                                                               |
| `[actionbar]`     | It will allow you to send a message in actionbar.                                                                                                                 |
| `[minimessage]`   | <p>It will allow you to send the minimessage format that will be sent to the player.<br></p><p><https://docs.advntr.dev/minimessage/format.html></p>              |
| `[minibroadcast]` | <p>It will allow you to send the mini-message format to all connected players.<br><br><https://docs.advntr.dev/minimessage/format.html></p>                       |
| `[log]`           | It will display a message on the server backend.                                                                                                                  |
| `[firework]`      | <p>Launches a firework with the desired configuration<br><code>\[firework] colors=RED,BLUE;fade=WHITE;type=BALL\_LARGE;power=2;flicker=true;trail=true</code></p> |
| `[permission]`    | Adds permissions to the player (Requires Vault)                                                                                                                   |
| `[!permission]`   | Remove player permissions (Requires Vault)                                                                                                                        |
| `[nextpage]`      | Next page (Only functional for page system)                                                                                                                       |
| `[previouspage]`  | Previous page (Only functional for page system)                                                                                                                   |

```yaml
    ##
    ## You can use {player} to get the name of the player or
    ##
    ## Remember to install PlaceholderAPI and load the expansion Player :
    ## /papi ecloud download Player or %player_name% will not work.
    ##
- '[command] eco give {player} 10000 <delay=40>'  # Gives 10,000 coins to the player after 40 ticks
#- '[chance=50] [command] say Hi {player}' # With a 50% probability, the server says "Hi" to the player.
#- '[player] /rewards' # Execute the /rewards command as the player
#- '[message] &aYou have correctly claimed your reward' # Sends a confirmation message to the player
#- '[sound] BLOCK_NOTE_BLOCK_HARP;1.0f;1.0f' # Plays a sound to the player SOUND;YAW;PITCH
#- '[broadcast] &8» &eThe player &7{player} &ehas claimed his &7Basic &ereward using &7&o(&a/rewards&7)'  # Public message announcing the reward
#- '[title] &a&lCLAIMED;&fsuccess;10;20;10' # Displays a title to the player
#- '[close]' # Closes the player's inventory
#- '[actionbar] &aYou have correctly claimed your reward' # Send a message in the actionbar to the player

# MiniMessage > https://docs.advntr.dev/minimessage/format.html#minimessage-format
#- '[minimessage] <MiniMessage>'
#- '[minibroadcast] <MiniMessage>'
```

***

### Sub Actions

Examples:

It is important to maintain the space between chance and action.

| Prefix       | Description                  |
| ------------ | ---------------------------- |
| \[chance=50] | Add chance to your action    |
| \<delay=20>  | Add a delay to your actions. |

```yaml
actions:
 - "[chance=50] [command] say Hi %player_name%"
```

```yaml
actions:
 - "[command] say Hi %player_name% <delay=20>"
```


---

# Agent Instructions: 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://docs.xshyo.us/general/items-or-custom-items.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.
