-
Notifications
You must be signed in to change notification settings - Fork 14
module custom_items
goflishMC edited this page Jun 30, 2025
·
4 revisions
The custom_items module allows you to define static, non-randomized items like crafting materials, collectibles, or cosmetic gear. These items support display names, lore, enchantments, model data, unbreakability, color, and flags.
All item definitions are stored in:
/plugins/Divinity/modules/custom_items/items/
Each .yml file defines one item. The filename becomes the item’s internal ID.
name: '&5Adamantine Ingot'
lore:
- '&8--------------------'
- ' &7Refined adamantine used for crafting'
- ' &7the most durable and powerful items.'
- '&8--------------------'
material: PAPER
model-data: 29
color: -1,-1,-1
unbreakable: true
item-flags:
- HIDE_ADDITIONAL_TOOLTIP
- HIDE_ARMOR_TRIM
- HIDE_ATTRIBUTES
- HIDE_DESTROYS
- HIDE_DYE
- HIDE_ENCHANTS
- HIDE_PLACED_ON
- HIDE_UNBREAKABLE
enchantments: [ ]
tier: veryraremetals| Field | Description |
|---|---|
name |
Display name (color codes supported). |
lore |
List of strings shown as item lore. |
material |
Bukkit material (e.g. IRON_INGOT, DIAMOND_SWORD). |
model-data |
Resource pack custom model data. |
color |
RGB value for dyeable items. -1,-1,-1 disables color. |
unbreakable |
If true, the item won’t take durability damage. |
item-flags |
Controls visual display properties (see list below). |
enchantments |
List of enchantments. Use [] for none. |
tier |
Optional classification for integration with other modules. |
Use flags to hide attributes on the item:
HIDE_ATTRIBUTESHIDE_ENCHANTSHIDE_UNBREAKABLEHIDE_DESTROYSHIDE_PLACED_ONHIDE_DYEHIDE_ARMOR_TRIMHIDE_ADDITIONAL_TOOLTIP-
'*'— hide all of the above
command-aliases: customitems
item-format:
name: '%ITEM_NAME%'
lore:
- '%ITEM_LORE%'| Setting | Description |
|---|---|
command-aliases |
Aliases for the module's base command |
item-format |
Format applied when items are displayed |
You can drop custom items using the loot system:
rewards:
- type: CUSTOM_ITEM
id: adamantine_ingot
amount: 1
chance: 100.0| Field | Description |
|---|---|
type |
Must be CUSTOM_ITEM
|
id |
File name without .yml
|
amount |
How many to give |
chance |
Percent chance to drop |
- Combine with resource packs using
model-datafor visuals. - Use
tierto track rarity or integrate with socketing/fortify/item_generator. - Pair with merchant GUIs or quest rewards for utility materials.
| Command | Description | Permission |
|---|---|---|
/customitems help |
Show help page | divinity.customitems.help |
/customitems get <id> [level] [amount] |
Get an item | divinity.customitems.get |
/customitems give <player> <id> [level] [amount] |
Give an item | divinity.customitems.give |
/customitems drop <world> <x> <y> <z> <id> [level] [amount] |
Drop an item in the world | divinity.customitems.drop |
/customitems list [page] |
List registered items | divinity.customitems.list |
/customitems reload |
Reload the module | divinity.customitems.reload |