module custom_items - magemonkeystudio/divinity GitHub Wiki

πŸ› οΈ Custom Items Module

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.


πŸ“ File Structure

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.


πŸ“¦ Example: adamantine_ingot.yml

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

πŸ” Supported Fields

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.

🧾 Item Flags

Use flags to hide attributes on the item:

  • HIDE_ATTRIBUTES
  • HIDE_ENCHANTS
  • HIDE_UNBREAKABLE
  • HIDE_DESTROYS
  • HIDE_PLACED_ON
  • HIDE_DYE
  • HIDE_ARMOR_TRIM
  • HIDE_ADDITIONAL_TOOLTIP
  • '*' β€” hide all of the above

πŸ”— Spigot ItemFlag Reference


βš™οΈ settings.yml

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

🎁 Integration: Loot System

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

πŸ§ͺ Usage Tips

  • Combine with resource packs using model-data for visuals.
  • Use tier to track rarity or integrate with socketing/fortify/item_generator.
  • Pair with merchant GUIs or quest rewards for utility materials.

🧾 Commands & Permissions

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

🏠 Return to Home

← Return to Home

⚠️ **GitHub.com Fallback** ⚠️