Items Configuration

Entries

  • id: Item unique identifier.

  • display-name: Item diplay name.

  • description (optional): Item description.

  • custom-model-data (optional): Item custom model data.

  • head-texture (optional): Head texture. Only supported if the material is player head.

  • action: The action to execute.

Each YAML file (.yml) located within the "item" folder is meticulously interpreted by the plugin as a unique item. These items serve the distinct purpose of executing specific actions.

To illustrate, some items might be designed to:

  • Spawn vehicles. Example:

id: example-item-a
material: PLAYER_HEAD
head-texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDFmMDRkMDgxODBhN2E1Y2M2MzA1NTU4N2EyZWNkZTVhYzg2ZjlmNDhmMGUzYjBlZTNhOTg2NjM4ODc3YWVlZiJ9fX0=
display-name: '&cSmall Fishing Boat'
description:
- ''
- '&aRight click to place it'

action:
  type: spawn
  vehicle-id: 'small-fishing-boat'
  • Supply fuel. Example:

id: example-item-b
material: PLAYER_HEAD
head-texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGI4OWRlNDhhOWI4N2NmZDA3YzcwNGYyYmU1ZTVhOGNjNDVlODA3OWQzOGZhYWVkZjEzYjE1ZDE1YTEwYTcwYyJ9fX0=
display-name: '&c120 Litters Bottle (%f left)'
description:
- ''
- '&a%f litters left'

action:
  type: fuel
  fuel-amount: 120.0

Creating items

To create an item, you have to specify a set of values , starting with the id (unique identifier) and the material. A display name should also be specified. A description is also recommended, so the players in your server are able to tell what the item is for. (You can take a look at the examples above). Once the values that determine how the item will look are set, you will now have to specify the action this item will execute. The action will be executed depending on the type of action. For example, the "spawn" action is executed when the player right-clicks on the ground/water; and the "fuel" action is exectued when the player right-clicks a vehicle. When setting the action, you will have to specify the type of action, and a set of values that are dependent on the type of action to execute. For example, in the case of the "spawn" action, you would have to specify the "vehicle-id" which is the id of the vehicle to spawn; and in the case of the "fuel" action, you would have to specify the amount of fuel to supply.

Available actions:

Spawn

Spawns a vehicle when right-clicking on the ground. Required values:

  • vehicle-id: The id of the vehicle to spawn.

Fuel

Supplies fuel to a vehicle when right-clicking on it. Required values:

  • fuel-amount: The amount of fuel to supply.

Note that if fuel remains after fueling a vehicle, the item will update to reflect this. The "%f" will be replaced by the amount of fuel the item supplies.

Last updated