Kit editor
Let players arrange their own kit layout: menu or room mode, saving, enchanter, shield and trims.
File: plugins/MineDuels/kit-editor.yml. Reload: /md reload. The reference is kit-editor.yml.
The kit editor lets a player move the items of a kit to the slots they like. Their layouts are saved with their profile and used when they play the kit.
For players
| Command | What it does |
|---|---|
/kit editor | Opens the editor. Needs mineduels.editor, which everyone has |
/leave | Leaves the editor. It never saves |
In the editor a player picks a kit, arranges the items, and saves. They can keep up to max-layouts saved layouts per kit.
Settings
kit-editor:
max-layouts: 1
mode: menu
on-close: discard
room:
on-exit: ask
drop-deletes: true
hide-players: true| Key | Default | Meaning |
|---|---|---|
max-layouts | 1 | Layouts a player can save per kit |
mode | menu | menu is a chest menu. room is a physical room |
on-close | discard | What closing the menu does with unsaved changes |
room.on-exit | ask | In the room: ask, save or discard when the player leaves. /leave and /spawn never save |
room.drop-deletes | true | Dropping an item in the room deletes it |
room.hide-players | true | Hide other players in the room |
Set the room with the editor room commands. See Commands.
Kit room, enchanter, shield and trims
layout-editor:
cosmetics-button: false
cosmetics-permissions: true
extra-items:
enabled: true
enchanter:
enabled: true
allowed: []
max-levels: {}
curses: false
shield:
enabled: true
max-layers: 6
armor-trims:
enabled: true| Feature | Meaning |
|---|---|
extra-items | The kit room: categories of extra items a player may add. Open one with /md kit kitroom <kit> for kits with the rule editor-extras |
enchanter | A tab where players add enchantments. allowed limits which ones (empty is every enchantment that fits). max-levels caps a level, for example { sharpness: 5 }. curses allows curses. The kit also needs the rule editor-enchanter: true |
shield | The shield designer, 1 to 6 layers. The kit rule editor-shield: false turns it off for a kit |
armor-trims | Armor trims. The kit rule editor-trims: false turns it off for a kit |
layout-editor.cosmetics-button | Show a Cosmetics button for the shield and trims |
layout-editor.cosmetics-permissions | Require mineduels.editor.cosmetics (or mineduels.editor.shield and mineduels.editor.trims) |
Per kit
A kit decides in its own file what players may change. A kit with the rule editor: false is hidden from the editor. See Kit rules.
rules:
editor: true
editor-enchanter: false
editor-shield: falseThe global switches here and the kit's rules both have to allow a feature.
Layout checks
When a player saves, MineDuels checks the layout against the kit so it can never duplicate or bring in items:
- Items must come from the kit itself. A layout never has more of an item than the kit has, unless the kit room offers it too.
- Kit room items can be added in any number, at most one full stack per slot.
- Enchantments may only be changed within the enchanter rules above.
- A shulker box may only hold such items, one level deep.
A layout that fails the check is not saved.
On a network
Layouts are saved in the shared database, so a layout made on one lobby is used on every game server. Keep the kit files identical on every server. See Files per server.
Related: Kit rules, Creating kits and arenas, Dialogs.