Fuel
If a vehicle has a fuel block, it burns fuel as it drives and stops when empty. Players refuel by holding a fuel item and interacting with the vehicle. Fuel can be given, bought from a shop, or sold by you.
Fuel types
Each fuel type is an HJSON file in:
/plugins/VehiclesPlus/fuels/<name>.hjson
The default gasoline type:
{
name: gasoline
item: {
material: LEATHER_HELMET
custommodeldata: 1
color: { red: 160, green: 101, blue: 64 }
}
pricePerLiter: 1.5
}
| Key | Description |
|---|---|
name | The fuel id. Vehicles reference it via their fuel.typeId. Must match the file name. |
item | The physical fuel item players carry (material + optional custommodeldata + color). |
pricePerLiter | Price of one liter in the fuel shop. |
To add a new fuel (e.g. diesel or kerosene), copy gasoline.hjson, rename it and the name, give it its own model/color, and set the price.
Linking a fuel to a vehicle
In a vehicle model:
fuel: { typeId: gasoline, usage: 6 }
typeId— which fuel type it uses.usage— how quickly it's consumed.
Buying & giving fuel
| Command | Purpose |
|---|---|
/fuel shop | Open the fuel shop GUI. |
/fuel buy <type> [liters] | Buy fuel directly. |
/fuel give <player> <type> [liters] | Give fuel for free (admin). |
The liter amounts offered in the shop are set in config.yml → fuel. Buying requires Vault + an economy plugin.