---
description: Guide to create a new sound effect.
---

# Create sounds

{% hint style="warning" %}
In this section we will only talk about <mark style="color:orange;">`sound_type`</mark>, we will not talk about the other sections, so if you want to know more, [click here](modify-menu).
{% endhint %}

## material\_no\_permission

This material will be displayed when a player does not have the necessary permission for the message. To learn more about the materials and how you should use them, [click here](../modify-menu#material).

{% code title="sounds.yml" lineNumbers="true" %}
```yaml
Menu:
 material_no_permission: 'BARRIER'
```
{% endcode %}

<figure><img src="https://1804475110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FchuWInciGAIrzxPTLHGa%2Fuploads%2FiNd8LVBC9eeny96rf5sN%2Fmaterial_no_permission.png?alt=media&#x26;token=8c4fd86e-568b-483b-8425-51e8a8e8f28c" alt=""><figcaption><p>No Permissions</p></figcaption></figure>

## create new sound

Below you have the model to be able to copy and paste in your configuration file, it is important that you modify the name <mark style="color:blue;">`"key_name"`</mark> to avoid errors with the plugin.

{% code title="sounds.yml" lineNumbers="true" %}
```yaml
  key_name:
   material: 'MATERIAL_NAME'
   display_name: 'SOUND_NAME'
   slot: 1
   lore:
    - 'Here enter the text you like'
    - 'Remember that you can also use variables from PlaceholderAPI'
    - 'and special variables of sound'
    - ''
   sound_type: 'SOUND_NAME'
   permission: 'PERMISSION'
```
{% endcode %}

For the topic of the <mark style="color:blue;">`sound_type`</mark> section, there is another page where the correct use of this will be better explained. Please [click here](../others#correct-use-of-sounds).

## permission

This section is optional, if you want all users to be able to select this firework without permission, just put <mark style="color:blue;">`"none"`</mark>, it should be:

{% code title="sounds.yml" lineNumbers="true" %}
```yaml
permission: 'none'
```
{% endcode %}

But if you like, you can place a permission, this so that only users with this permission can select it.

{% code title="sounds.yml" lineNumbers="true" %}
```yaml
permission: 'customjoin.sound_name'
```
{% endcode %}

## Example

Here are some sample sounds, you can copy and paste them into your config file.

{% hint style="warning" %}
Remember to change the name of the <mark style="color:green;">`path`</mark> (only if there is one repeated) and the place where it is located.
{% endhint %}

{% tabs %}
{% tab title="Example 1" %}
{% code title="sounds.yml" lineNumbers="true" %}
```yaml
  super_sound:
   material: 'NOTE_BLOCK'
   display_name: '&cSuper Sund'
   slot: 1
   lore:
    - ''
    - '&9&nCharacteristics:'
    - ''
    - ' &a&l‣ &fSund: &b%sound_type%'
    - ' &a&l‣ &fStatus: %sound_status_selected%'
    - ''
    - '%sound_status_locked%'
   sound_type: 'DOOR_OPEN;3;4'
   permission: 'customjoinevents.sound.super_sound'
```
{% endcode %}
{% endtab %}

{% tab title="Example 2" %}
{% code title="sounds.yml" lineNumbers="true" %}
```yaml
  special:
   material: 'NOTE_BLOCK'
   display_name: '&6&lSPECIAL'
   slot: 2
   lore:
    - ''
    - '&9&nCharacteristics:'
    - ''
    - ' &a&l‣ &fSund: &b%sound_type%'
    - ' &a&l‣ &fStatus: %sound_status_selected%'
    - ''
    - '%sound_status_locked%'
   sound_type: 'BLOCK_BEACON_ACTIVATE'
   permission: 'customjoinevents.sound.special'
```
{% endcode %}
{% endtab %}

{% tab title="Example 3" %}
{% code title="sounds.yml" lineNumbers="true" %}
```yaml
  villager:
   material: 'NOTE_BLOCK'
   display_name: '&cVillager death'
   slot: 3
   lore:
    - ''
    - '&9&nCharacteristics:'
    - ''
    - ' &a&l‣ &fSund: &b%sound_type%'
    - ' &a&l‣ &fStatus: %sound_status_selected%'
    - ''
    - '%sound_status_locked%'
   sound_type: 'VILLAGER_DEATH'
   permission: 'customjoinevents.sound.villager'
```
{% endcode %}
{% endtab %}

{% tab title="Example 4" %}
{% code title="sounds.yml" lineNumbers="true" %}
```yaml
  wither:
   material: 'NOTE_BLOCK'
   display_name: '&cRespawn'
   slot: 4
   lore:
    - ''
    - '&9&nCharacteristics:'
    - ''
    - ' &a&l‣ &fSund: &b%sound_type%'
    - ' &a&l‣ &fStatus: %sound_status_selected%'
    - ''
    - '%sound_status_locked%'
   sound_type: 'WITHER_SPAWN;3;4'
   permission: 'customjoinevents.sound.wither'
```
{% endcode %}
{% endtab %}
{% endtabs %}

## Sounds Variables

Here are the variables that can be occupied solely in this event (lore), but you can also occupy PlaceholderAPI variables.

|          Variable         |                                                                                                                 Description                                                                                                                |
| :-----------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|       `%sound_name%`      |                         Shows the name of the sound depending on the option it has <mark style="color:green;">`(key/display_name)`</mark>. Example: `super_sound` or <mark style="color:red;">`Super Sound`</mark>                         |
|       `%sound_type%`      |                                                        Shows the type of sound that was defined in the <mark style="color:orange;">`sound_type`</mark> section. Example: `DOOR_OPEN`                                                       |
|  `%sound_status_locked%`  | Shows the state of the sound, if the user has the corresponding permission, the message that you configured in translations will appear. Example: <mark style="color:green;">`Unlocked`</mark> or <mark style="color:red;">`Locked`</mark> |
| `%sound_status_selected%` |        It shows the state of the sound, if the user has selected the message that you configured in translations will appear. Example: <mark style="color:green;">`Selected`</mark> or <mark style="color:red;">`Unselected`</mark>        |
|         `%player%`        |                                                                              Shows the name of the player who is interacting with the menu. Example: `_ImJona`                                                                             |
