# Fuel

{% hint style="danger" %}
Do not reload the plugin or the server to put these changes into effect. Restart the server.
{% endhint %}

***

## <mark style="color:orange;">Information</mark>

The default fuel items can be found in the `config.yml`. Some examples are: Wood items, coal, wool items, lava buckets, wheat, etc...&#x20;

To refuel your vehicle open the fuel gui ([<mark style="color:orange;">controls</mark>](https://docs.vehiclesplugin.com/introduction/faq#how-do-i-drive-this-that-vehicle)), and drag the items onto the fuel bucket.

***

## <mark style="color:orange;">General Fuel Settings</mark>

{% code title="" %}

```yaml
fuelEnabled: true
fuelBarEnabled: true
#1: Text, 2: Icon
fuelBarType: 2
iconFuelBarSize: 30
```

{% endcode %}

| Setting           | Info                                                               |
| ----------------- | ------------------------------------------------------------------ |
| `fuelEnabled`     | Enable or disable the fuel entirely                                |
| `fuelBarEnabled`  | Enable or disable the fuel bar icon/text in your action bar.       |
| `fuelBarType`     | Choose between text or bars (icon) to indicate the remaining fuel. |
| `iconFuelBarSize` | For the icon fuel bar, select how many bars are displayed.         |

***

## <mark style="color:orange;">Adding Fuel Items</mark>

{% code title="" %}

```yaml
fuelMaterialValues:
 'OAK_LOG':
  material: 'OAK_LOG'
  fuel-amount: 4
```

{% endcode %}

| Setting       | Info                                                                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------ |
| `'OAK_LOG'`   | Set a unique name for the fuel.                                                                              |
| `material`    | Select the material/block/item which shall be used to refuel. It must be a valid vanilla Minecraft Material. |
| `fuel-amount` | Set the amount each item should refuel the vehicle for.                                                      |

{% hint style="info" %}
You can add as many or as few items as you'd like to.
{% endhint %}

***

## <mark style="color:orange;">Custom Fuel Item</mark>

{% code title="" %}

```yaml
 'CUSTOM_ITEM_1':
  material: 'PLAYER_HEAD'
  displayName: '&eFuel Can'
  lore:
   - '&7Used to refill vehicles fuel.'
  fuel-amount: 20
  displayNameRequired: true
  loreRequired: true
```

{% endcode %}

| Setting                               | Info                                                                                                                              |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `'CUSTOM_ITEM_1'`                     | Set a unique name for the fuel.                                                                                                   |
| `material`                            | Select the material/block/item which shall be used to refuel.                                                                     |
| `displayName`                         | Set a display name for your item.                                                                                                 |
| `lore`                                | Set an optional lore for your fuel item.                                                                                          |
| `fuel-amount`                         | Set the amount each item should refuel the vehicle for.                                                                           |
| `displayNameRequired`, `loreRequired` | Enable or disable the option for the lore or displayname to be required. If enabled, the item needs to have that exact name/lore. |

### <mark style="color:orange;">Custom Skull Fuel with HDB</mark>

If you are using [*<mark style="color:orange;">HeadDataBase</mark>*](https://www.spigotmc.org/resources/head-database.14280/)*\** and would like to use the same fuel can as in the refuel gui, here is a small tutorial: (This works with every other head too.)

**Step 1:** Setup the fuel in the *Vehicles* config.yml like this.

{% code title="" %}

```yaml
 'CUSTOM_ITEM_1':
  material: 'PLAYER_HEAD'
  displayName: '&aFuel Can'
  lore:
   - '&7Used to refill vehicles fuel.'
  fuel-amount: 50
  displayNameRequired: true
  loreRequired: false
```

{% endcode %}

**Step 2:** In your *HeadDataBase* config.yml find `disabled-heads:`. Add the following head to that list. That head is now no longer buyable through the *HeadDataBase* menu.

{% code title="HeadDataBase - config.yml" %}

```yaml
disabled-heads:
  - "ID:812"
```

{% endcode %}

**Step 3:** In your *HeadDataBase* config.yml find `rename-heads:`. Add the following ID and name. (Make sure that the name of the skull in *Vehicles* and *HeadDataBase* are the same! Including color codes!)

{% code title="HeadDataBase - config.yml" %}

```yaml
rename-heads:
  812: "&aFuel Can"
```

{% endcode %}

**Step 4:** Restart your server, and you will now able to give players the fuel can skull with the following command: `/hdb give 812 <amount> <player>` \
\
\
\&#xNAN;*\* HeadDataBase is not affiliated with Vehicles, the developer or any of our plugins.*
