# Defined Items

Defined Items are named items defined by our [item-builder](https://docs.roanoke.dev/mods/mods/roanoke-library-rib/item-builder "mention") format. You'll be familiar with it if you've used Roanoke Mods before, the tldr is it lets server owners quickly define complex Items in JSON.

You can configure your defined items in the

```
/config/LazyNPCs/item_definitions.json
```

file. By default, it's got an example item in it:

```json
{
  "special_dirt": {
    "id": "minecraft:dirt",
    "amount": 64,
    "name": "<red>Special Dirt",
    "lore": [
      "",
      "<gray>This is super special Dirt...",
      "<rainbow>Chat formatting!",
      ""
    ]
  }
}
```

You can view defined items in-game by doing /lazynpcs gui, or give them to yourself with the command /lazynpcs item \<name>. If you edit the config file, you can apply the changes by doing /lazynpcs reload.

With Molang, you can give defined items to players, check if they have a defined item, and take a defined item.&#x20;

* **player.give\_defined\_item("name")** - gives the player the defined item. Returns false if the item wasn't found.
* **player.has\_defined\_item("name")** - checks if the player has the defined item in their inventory. Useful for quests!
* **player.give\_defined\_item("name", play\_sound \[Boolean: default False])** - gives the player the defined item. Can optionally play a sound to the player. If their inventory is full, it is dropped by the player.
