module sell - magemonkeystudio/divinity GitHub Wiki
π° Sell Module
The Sell module allows players to quickly sell items through a custom GUI. It supports a configurable interface, permission control, and a command system for opening and managing the sell window.
π File Location
plugins/Divinity/modules/sell/settings.yml
π§Ύ Configuration
command-aliases: sell
gui:
title: '&4&l<&4&nSelling&4&l>'
size: 54
item-slots: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44
content:
filler_yellow:
material: YELLOW_STAINED_GLASS_PANE
name: '&7'
slots: 45,46,52,53
type: NONE
filler_orange:
material: ORANGE_STAINED_GLASS_PANE
name: '&7'
slots: 47,51
type: NONE
filler_red:
material: RED_STAINED_GLASS_PANE
name: '&7'
slots: 48,50
type: NONE
sell:
material: EMERALD
skull-hash: ''
enchanted: false
name: '&2ΓΒ« &aSell &2ΓΒ»'
lore:
- '&eTotal cost: &6$%cost%'
- '&8&m '
- '&7Sell all items in GUI.'
slots: '49'
type: ACCEPT
π How Item Prices Are Calculated
Item values are defined in worth.yml
. When a player sells an item:
-
Material Matching
The itemβs material type is matched against entries inworth.yml
. -
Optional Metadata Matching
Items can also be matched using optional conditions:- Display name (
name
) - Lore (
lore
) custom-model-data
- NBT data (
nbt
)
- Display name (
-
Value Calculation
If a match is found, the value is multiplied by the itemβs quantity and shown as the total worth. -
No Match = $0
Items not found inworth.yml
are not sellable and show no value. -
Modifiers
Additional multipliers may be applied in certain modules (e.g., merchants) depending on configuration.
π For full item pricing setup, see: worth.yml
π§Ύ Commands
Command | Description |
---|---|
/sell open [player] [force:true/false] |
Opens the sell GUI for a player. |
/sell help |
Displays help information. |
/sell reload |
Reloads the Sell module. |
π Permissions
Permission Node | Description |
---|---|
divinity.sell.open |
Required to use /sell open . |
divinity.sell.reload |
Required to reload the module. |
divinity.sell.help |
Required to access help information. |
divinity.sell.* |
Grants access to all Sell commands. |
πΌοΈ GUI Overview
The sell GUI has 45 item slots (0β44) for players to place items they want to sell. Special colored panes are used to visually segment the interface:
- Yellow β Corners and sides (decorative filler).
- Orange β Outer edge.
- Red β Outer edge.
- Emerald β Center slot (49), used to finalize the sale and show total sell value.