Repository navigation
Admin Editor
LofiBox includes a full in-game GUI editor so you can create and edit boxes without touching any YAML files.
/lofibox editor
Permission: lofibox.editor (default: op)
The first screen lists all loaded boxes. Each box is shown as its box item with ID, reward count, key requirement, and cost displayed in the lore.
| Action | Result |
|---|---|
| Left-click a box | Open that box in the box editor |
| Click Create New Box (emerald) | Prompts for a box ID in chat, then opens a blank box editor |
| ← / → arrows | Paginate the box list |
The box editor has three sections:
| Slot | Button | How to use |
|---|---|---|
| Box Item | The current box item | Hold any item and left-click to capture it |
| Display Name | Writable book | Click → type in chat (MiniMessage supported) |
| Required Key | Tripwire hook | Left-click cycles tiers (None → Wooden → … → Netherite → None); right-click clears |
| Open Cost | Gold ingot | Click → type a number in chat; enter 0 to disable |
| Open Sound | Note block | Click → type a sound key (e.g. block.chest.open) |
| Win Sound | Jukebox | Click → type a sound key (e.g. entity.player.levelup) |
Each reward shows its display item, weight, action count, and permission (if any).
| Action | Result |
|---|---|
| Left-click a reward | Open that reward in the reward editor |
| Shift-right-click a reward | Remove the reward immediately |
| Add Reward (lime dye) | Add a blank new reward and open it in the reward editor |
| ← / → arrows | Paginate the reward list |
| Button | Action |
|---|---|
| ← Back | Return to the main editor (unsaved changes are kept in memory) |
| Add Reward | Add a blank new reward |
| Save Box | Validate, write YAML, and reload all boxes. Requires a box item and at least one complete reward |
| Delete Box | Shift-click to permanently delete the YAML file and reload |
| Slot | Button | How to use |
|---|---|---|
| Reward Item | Current item | Hold any item and left-click to capture it |
| Display Name | Writable book | Click → type in chat |
| Weight | Orange glass pane | Left-click +1, Right-click −1, Shift+Left +10, Shift+Right −10 |
| Permission | Paper | Click → type a permission node; leave blank to remove |
| Action items | Paper items | Click any action item to remove it |
| Add Action | Lime dye | Click → type an action string in chat |
| ← Back | Return to box editor (changes are already applied to the in-memory draft) | |
| Apply & Back | Confirm reward item is set, then return to the box editor |
Whenever the editor needs text from you (names, sounds, costs, actions), it closes the GUI and prompts you to type in chat.
- Type your response and press Enter — the GUI reopens with the value applied.
- Type
cancelto abort without making any change.
The editor captures items exactly as they are in your main hand — including all PDC data, enchantments, and custom attributes from plugins like MMOItems or Oraxen. The item is stored as a base64 snapshot in the YAML (item-data: field), so all properties are preserved across server restarts.
When you click Save Box:
- LofiBox validates the draft (box item present, at least one complete reward).
- The box is written to
plugins/LofiBox/boxes/<id>.yml. - All boxes are reloaded — the box is immediately live with no server restart needed.
If you only edited an existing box, the file is overwritten in place. If it was a new box, a new file is created.
- Unsaved drafts are held in memory. Closing the GUI without saving preserves the draft until you reopen
/lofibox editor. - HDB category rewards (
head-database-category) created via YAML still work normally — the editor just doesn't expose an HDB picker. - Only rewards whose item has been set are written to the YAML on save; blank rewards are silently skipped.