module extractor - magemonkeystudio/divinity GitHub Wiki

๐Ÿงฐ 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

โš ๏ธ **GitHub.com Fallback** โš ๏ธ