-
Notifications
You must be signed in to change notification settings - Fork 14
module custom_items
The custom_items module allows you to define static, custom Minecraft items with names, lore, enchantments, model data, unbreakability, flags, and color. These are typically used for crafting materials, collectibles, or cosmetic gear.
All custom item definitions are placed in:
/plugins/Divinity/modules/custom_items/items/
Each .yml file defines a single item. The file name becomes the internal item 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 (supports color codes). |
lore |
Lore lines shown on the item. |
material |
Bukkit material name (e.g. IRON_INGOT, DIAMOND_SWORD). |
model-data |
Custom model data for resource pack support. |
color |
RGB triplet for dyeable items. Use -1,-1,-1 to disable. |
unbreakable |
Whether the item is unbreakable. |
item-flags |
Controls hidden item attributes. See list below. |
enchantments |
Map of enchantments (empty list if none). |
tier |
Optional classification for use with other modules (e.g., socketing). |
You can use any combination of the following flags to hide item metadata or visual indicators:
HIDE_ATTRIBUTESHIDE_ENCHANTSHIDE_UNBREAKABLEHIDE_DESTROYSHIDE_PLACED_ONHIDE_DYEHIDE_ARMOR_TRIMHIDE_ADDITIONAL_TOOLTIP-
'*'— hide all applicable flags
For a full list and explanation of available flags, see the official Spigot documentation:
🔗 Spigot ItemFlag Enum Reference
File: /plugins/Divinity/modules/custom_items/settings.yml
command-aliases: customitems
item-format:
name: '%ITEM_NAME%'
lore:
- '%ITEM_LORE%'| Setting | Description |
|---|---|
command-aliases |
Alternate command names for item retrieval. |
item-format |
Placeholder formatting when generating item dynamically. |
Custom items can be given as rewards using the loot module:
rewards:
- type: CUSTOM_ITEM
id: adamantine_ingot
amount: 1
chance: 100.0| Field | Description |
|---|---|
type |
Must be CUSTOM_ITEM
|
id |
The YAML filename without .yml
|
amount |
Quantity to drop |
chance |
Drop chance in percent |
- Use
model-dataand resource packs to visually distinguish rare items. - Use
tierto categorize crafting materials for use in other modules likefortify,socketing, oritem_generator. - Combine with loot tables, vendor GUIs, or MythicMobs drops for advanced acquisition.
Give yourself a custom item with:
/customitems get adamantine_ingot
Where adamantine_ingot.yml is the file name in the items/ folder.
Let me know when you’re ready to document item_generator or other modules that consume these item definitions!