# Custom Loot

This configuration section allows for setting up custom loot drops with various settings, including item specifics, drop chance, requirements based on player levels, and more.

**`imperial: true`**

You can add `imperial: true` to the drop configuration if you want the `{length}` placeholder to display values in the **Imperial measurement system** (inches, feet) instead of the default **Metric system** (centimeters, meters).

**Top-Level Configuration Options**

| Key           | Type    | Description                                                    |
| ------------- | ------- | -------------------------------------------------------------- |
| `custom-loot` | Section | Main configuration section for custom loot drops.              |
| `enabled`     | Boolean | Enables or disables the custom loot system.                    |
| `chance`      | Integer | Chance (in %) for custom loot to drop when conditions are met. |
| `rewards`     | Section | Defines specific loot items and their requirements.            |

**Rewards Section**

Each entry under `rewards` defines an individual loot item and its requirements. Entries are identified by unique string keys (e.g., `'1'`), which should be incremented for each new reward.

| Key                 | Type    | Description                                                                          |
| ------------------- | ------- | ------------------------------------------------------------------------------------ |
| `chance`            | Integer | Chance (in %) for this specific reward to drop, independent of `custom-loot` chance. |
| `level-requirement` | Integer | Minimum player level required for this reward to be available.                       |
| `item`              | Section | Item configuration section (see below for details).                                  |
| `amount`            | Integer | Quantity of the item to drop.                                                        |
| `size`              | Range   | Specifies a range (e.g., `15-30`) for the item's stack size.                         |

**Item Configuration Section**

Each reward includes an `item` section that specifies the properties and appearance of the item to be dropped.

| Key        | Type    | Description                                                                                             |
| ---------- | ------- | ------------------------------------------------------------------------------------------------------- |
| `material` | String  | The base material of the item (e.g., `RAW_FISH`).                                                       |
| `base64`   | Section | Custom texture configuration for the item.                                                              |
| `name`     | String  | Display name of the item. Supports color codes (`&` format).                                            |
| `lore`     | List    | List of strings defining the lore of the item, supporting color codes and placeholders like `{length}`. |

**Note**: Color codes use `&#` syntax to specify hex colors (e.g., `&#6B9F94`), which can create more customized color effects.

**Base64 Section**

The `base64` section is used to apply a custom texture to the item. This requires two fields:

| Key       | Type    | Description                                                                                                |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| `enabled` | Boolean | Enables or disables custom texture for the item.                                                           |
| `value`   | String  | Base64-encoded texture value for the item. Example values can be obtained through external skin databases. |

**Example Breakdown**

* **Material**: Specifies the item as a `RAW_FISH`.
* **Custom Texture**: Enabled with a Base64-encoded texture, applied only if `base64.enabled` is set to `true`.
* **Item Name**: Displayed as `&lsᴀʀᴅɪɴᴀ` in teal color.
* **Lore**: Provides extra text with `{length}`, which can be set to show in Imperial or Metric values.
* **Amount**: 1 item will drop per successful reward.
* **Size**: Specifies a range for the item stack, generating between 15 and 30 weight.

```yaml
  custom-loot:
    enabled: true
    chance: 100
    rewards:
      #Must have atleast one reward with level-requirement:0
      '1':
        imperial: true
        chance: 100
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWZiZTFiZTE5ZTRmZmFiYTk3ZDYxYmVlZjdjYTMwMTBiNjI5OTZjNjQxZTU3MDg0ZmMzNjRhNmYzZWIxNDEzOCJ9fX0=
          name: '&#6B9F94&lsᴀʀᴅɪɴᴀ'
          lore:
            - '&8ᴄᴏᴍᴍᴏɴ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 15-30

      '2':
        chance: 70
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MmQ3ZGQ2YWFkZjM1Zjg2ZGEyN2ZiNjNkYTRlZGRhMjExZGY5NmQyODI5ZjY5MTQ2MmE0ZmIxY2FiMCJ9fX0=
          name: '&#C2AE92&lᴄᴏᴅ'
          lore:
            - '&8ʀᴀʀᴇ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 40-85

      '3':
        chance: 60
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzViYTM5M2I5MjZlZTY5YTE0ZDRkODUzYjI1ZDI4NWE4NjhiMTZjNTZjOTE5ZDJiODI0NDEzZTY1NjZkNGU1NSJ9fX0=
          name: '&#FC5D94&lᴛʀᴏᴘɪᴄᴀʟ ꜰɪѕʜ'
          lore:
            - '&8ʀᴀʀᴇ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 35-40

      '4':
        chance: 50
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDZkZDVlNmFkZGI1NmFjYmM2OTRlYTRiYTU5MjNiMWIyNTY4ODE3OGZlZmZhNzIyOTAyOTllMjUwNWM5NzI4MSJ9fX0=
          name: '&#EE6426&lᴄʟᴏᴡɴꜰɪѕʜ'
          lore:
            - '&8ᴄᴏᴍᴍᴏɴ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 8-17

      '5':
        chance: 40
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTNlNjY4ODZhMzRlZWJiNTIwMzBmMGYzM2ZiZTYwYjcwYzY3ZGRjOTE4ZmFlZTQ1YTQyN2QzZjY4NzMwM2E4In19fQ==
          name: '&#E1C52E&lɢᴏʟᴅꜰɪѕʜ'
          lore:
            - '&8ʀᴀʀᴇ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 12-41

      '6':
        chance: 30
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDVhZjQ2OWU4MWUwZThmMjgwNzkyZTA2Mzk5NTg2MDFkMTIwMWRkNDIxNmI1M2FiNGE2NjU4MTBkYzMwNWU0MyJ9fX0=
          name: '&#FFFB00&lᴇʟᴇᴄᴛʀɪᴄ ᴍᴇᴅᴜsᴀ '
          lore:
            - '&8ᴇхᴏᴛɪᴄ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 120-200

      '7':
        chance: 20
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmI2NTZiYWM2NGFkYTY0ZmEyMjFlOWY0OGZiZjhhYjkzMzRiNzkzNGVmYjk3OWQ3NThkZjRkMGMxYmQxNzY5NSJ9fX0=
          name: '&#9B60FD&lᴍᴇᴅᴜsᴀ'
          lore:
            - '&8ᴇхᴏᴛɪᴄ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 120-200
      '8':
        chance: 10
        level-requirement: 0
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGZiYmQxYjExZGM3YTA3MTZlZDMxNWEzZTFiMjhmODllMDUwZjUyNDQ4MTAyZTI0ZTE4NzA2MjZjOWE4MTcyMyJ9fX0=
          name: '&#A3BEE8&lѕʜᴀʀᴋ'
          lore:
            - '&8ᴇхᴏᴛɪᴄ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 100-210
      '9':
        chance: 5
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2FmNzIyMTc5ODU0NmY4ZjllNzZhNmEzZWUzYjE3NjczNGU5ZDVmMTdkYmNiMDg1OTgxOTQxNzU4Njk4NjQzNiJ9fX0=
          name: '&#2893FF&lᴡʜᴀʟᴇ'
          lore:
            - '&8ᴇхᴏᴛɪᴄ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 2500-3000
      '10':
        chance: 5
        lava-drop: true
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTE0MGM0MmZjM2ExYmEyZmU3N2M0NWI5NzVmYTg3ZThmNTRhMWIxODMzYmM3NmU2MzM5YjRjMjYyMzA0MDExZCJ9fX0=
          name: '&#B0952A&lꜰʟʏꜰɪѕʜ'
          lore:
            - '&8ᴄᴏᴍᴍᴏɴ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 17-30
      '11':
        chance: 5
        lava-drop: true
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjU2YjU5NTViMjk1NTIyYzk2ODk0ODE5NjBjMDFhOTkyY2ExYzc3NTRjZjRlZTMxM2M4ZGQwYzM1NmQzMzVmIn19fQ==
          name: '&#FF6600&lᴍᴀɢᴍᴀꜰɪѕʜ'
          lore:
            - '&8ʀᴀʀᴇ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 200-500
      '12':
        chance: 5
        lava-drop: true
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTIzZTBhMjUwNDhiNjBhMmNjMDkyZjcyOTQzMTU5ZWMxNzAwNjNiYjIzNWFhNzk2OTBlZjM0YWIxODFkNjkxIn19fQ==
          name: '&#8E9091&lѕᴋᴇʟᴇᴛᴏɴ ꜰɪѕʜ'
          lore:
            - '&8ʀᴀʀᴇ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 200-500
      '13':
        chance: 5
        lava-drop: true
        item:
          material: RAW_FISH
          base64:
            enabled: true
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDlhNTI2NzNjNzdhYzA3OWVkMzQ3MmI2OWZlNGU5MWJkMjgwMTlmMjhmM2U5ZDg1YmY5NGRmYWQ2ZTM5OGM0ZiJ9fX0=
          name: '&#8E9091&lᴘɪɴᴇᴀᴘᴘʟᴇ ꜰɪѕʜ'
          lore:
            - '&8ᴇхᴏᴛɪᴄ ᴛɪᴇʀ'
            - '&7'
            - '&#2893FF▶ {length}'
        amount: 1
        size: 2000-5000
```

Possible Loot

<pre class="language-yaml"><code class="lang-yaml"><strong>   custom-loot:
</strong>    enabled: true
    chance: 100
    rewards:
      #Must have atleast one reward with level-requirement:0
      '1':
        size: 2000-5000 
        lava-drop: true
        ############################## 
        level-requirement: 5
        chance: 3
        commands:
         - '[sound]ENTITY_LEVEL_UP;1.0;1.0'
         - '[message]&#x26;7Example Message %player%'
         - '[broadcast]&#x26;7Example Message %player%'
         - '[json]{"text":"Message"}'
        permission: 'needed-permission'
        exp: 10-20 #Minecraft EXP
        xp: 10-20 #Tool XP
        use-price: false # Set to true if using sell-price: instead of length
        sell-price: 100-200
        amount: 1-3
        regions:
          - 'worldguardregions'
        prestige-requirement: 2
        level-requirement: 3
        exact-level: 2
        essence: 200
        item:
         name: ''
       ############################## 
         material: RAW_FISH
       ############################## 
         base64:
            enabled: true
            value: '' #https://minecraft-heads.com/custom-heads
       ############################## 
         skull:
            enabled: true
            name: Steve
       ############################## 
         lore: 
          - '&#x26;7Lore'
          - '&#x26;7Lore'
       ############################## 
         glow: true
       ############################## 
         enchants: # Enchants https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
          - 'DURABILITY:10'
       ############################## 
         flags:  # ItemFlags https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html
          - 'HIDE_ENCHANTS' 
       ##############################
         nbt: 
          integer:
            key: 'nbtitem'
            value: '1'
       ##############################  
         nbt: 
          string:
            key: 'nbtitem'
            value: 'Item'
       ############################## 
         nbt: 
          boolean:
            key: 'nbtitem'
            value: true
        ############################## 
        customdata: 1 # For Custom Textures 1.16+
        customModelData: 1 # For Custom Textures 1.16+
        
        
</code></pre>
