Skip to content

module extractor

goflishMC edited this page Jun 30, 2025 · 2 revisions

🧰 Extractor Module

The Extractor module allows players to extract socketed items (like gems or runes) from gear. This gives flexibility for letting players reuse socketable components under specific conditions.


📁 File Locations

plugins/Divinity/modules/extractor/
  • items/ – Define extractor tools
  • settings.yml – Configure extraction behavior (see extractor-settings)

🔧 Extractor Tools

To create an extractor item, place a YAML file in:

plugins/Divinity/modules/extractor/items/

Each file defines a reusable tool with configurable level ranges, usage limits, and target filters.


🧪 Example: Armor Extraction Tool

material: SHEARS
name: 'Armor Extraction Tool'
lore:
  - '&7Allows to extract item sockets.'
tier: common
item-flags:
  - '*'

level:
  min: 1
  max: 3

uses-by-level:
  '1': 1
  '2': 2
  '3': 3

target-requirements:
  type:
    - ARMOR
  level:
    '1': '1:5'
    '2': '6:15'
    '3': '16:30'
  module:
    - '*'

🔍 Field Breakdown

Field Description
material Base Minecraft item used for the extractor
name, lore Display text shown to players
tier Optional tier used for classification
item-flags Visual flags like hiding attributes or enchantments
level Min/max tool level range
uses-by-level Number of times it can be used per level
target-requirements Restricts which items can be extracted

🎯 Valid type Values

You can restrict extractors to certain item categories:

  • ALL
  • ARMOR
  • WEAPON
  • TOOL
  • SHIELD

You can list multiple types:

type:
  - ARMOR
  - TOOL

⚙️ Global Settings

If present, settings.yml controls extractor logic such as failure behavior, GUI feedback, or action hooks.
See: extractor-settings


🎮 Player Usage

  1. Player obtains an extractor item.
  2. Drag and drop it onto a compatible socketed item.
  3. If the target passes target-requirements, extraction is allowed.
  4. The socketed item is removed and returned.
  5. The extractor loses one use.

📋 Commands & Permissions

Command Description Permission
/extractor open <player> [force<true/false>] Open extractor GUI for player divinity.extractor.open
/extractor help Show help page divinity.extractor.help
/extractor get <id> [level] [amount] Get an extractor item divinity.extractor.get
/extractor give <player> <id> [level] [amount] Give extractor item to player divinity.extractor.give
/extractor drop <world> <x> <y> <z> <id> [level] [amount] Drop extractor item at coordinates divinity.extractor.drop
/extractor list [page] List defined extractor items divinity.extractor.list
/extractor reload Reload the module divinity.extractor.reload

📚 Related Pages

Clone this wiki locally