> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edcosmetics/modules/wardrobe.md).

# Wardrobe HUD

Module `wardrobe` (off by default). `/wardrobe` (alias `/outfit`) opens a full-screen wardrobe drawn by the resource pack; with `config.yml` → `menus.cosmetics: hud` plain `/cosmetics` opens it too (`/cosmetics <category>` and the other sub-commands keep working as usual).

* **Left**: the categories, with a dot on those where something is equipped.
* **Middle**: the player's own 3D model wearing the outfit being tried on (hats, wings, glow, size, skin effect), with a name tag showing the colours and tag being tried on. Turn the model with the arrows; RANDOM tries a random outfit of owned items; RESET goes back to what is worn.
* **Right**: only the cosmetics the player owns in that category, 12 per page, limited editions first, then by rarity. The default glows, sizes, skin effects, hats and wings have 3D pictures on their tiles; colours and tags show a sample; other cosmetics show their name. Click one to try it on, click it again or press EQUIP to put it on, REMOVE takes the category off. Hovering one shows a tooltip (rarity, description, owners of a limited edition). Right-click it twice to withdraw it as a voucher. An empty category shows a shop button (when you set one, below).
* Keys: A / D turn the page, W / S change the category. Move the mouse to move the cursor. Sneak or the X closes it. While it is open the player can't move, and the hotbar, hearts, hand, boss bars and sidebar are hidden.

Needs the modules `cosmetics` and `emotes` (the 3D model), packetevents and the resource pack. Players without the pack get the `no-pack` message; Bedrock players always get the chest menus.

## wardrobe/config.yml

```yaml
# The categories on the left, in this order (file names). [] = every category in their 'order'. At most 12.
categories: []

# What the OPEN SHOP button runs for the player ('' and no buttons.shop = no shop button).
shop-command: 'shop cosmetics'

# Actions a button runs when clicked, on top of what it does (shop: instead of shop-command, after closing).
buttons:
  shop:
    - 'player shop cosmetics'
    - 'sound ENTITY_EXPERIENCE_ORB_PICKUP 0.6 1.2'
  equip:
    - 'sound ENTITY_PLAYER_LEVELUP 0.4 1.6'
    - 'actionbar &aYou put on {cosmetic-name}&a!'
```

Buttons: `shop`, `close`, `category`, `tile`, `previous-page`, `next-page`, `equip`, `remove`, `rotate-left`, `rotate-right`, `random`, `reset`. They take the menu actions (`message`, `broadcast`, `actionbar`, `title`, `player`, `console`, `sound`, `open-gui`, `equip`, `unequip`, `emote`, see [Menus](/p/edcosmetics/reference/guis.md)) with the tokens `{player}`, `{category}` / `{category-name}` (the open category) and `{cosmetic}` / `{cosmetic-name}` (the cosmetic selected when the button was clicked).

### Texts

Every word on the HUD comes from `texts`, so the whole HUD can be translated:

```yaml
texts:
  title: 'WARDROBE'
  subtitle: 'YOUR COSMETICS'
  hints: ['[LMB] Try on', '[LMB x2] Equip', '[A/D] Pages', '[W/S] Category', '[SHIFT] Close']   # up to 5
  empty: 'Nothing here yet'
  empty2: 'Get some in the shop'
  equip: 'EQUIP'
  equipped: 'EQUIPPED'
  remove: 'REMOVE'
  random: 'RANDOM'
  reset: 'RESET'
  shop: 'OPEN SHOP'
  trying: 'TRYING ON'
  none: 'Nothing equipped'
  withdraw: 'Right-click: withdraw voucher'
  confirm: 'Right-click again to withdraw'
  rarities: { common: 'COMMON', uncommon: 'UNCOMMON', rare: 'RARE', epic: 'EPIC', legendary: 'LEGENDARY' }
```

The HUD draws them in its own colours and font (`&` codes are ignored). Latin, Latin Extended, Greek and Cyrillic letters are included; long texts are cut with `..`. Category and cosmetic names come from the category files.

### Other options

`timeout-seconds` (closes after that long without input), `click-cooldown-ms`, `disabled-worlds`, `packet-floor-worlds` (worlds whose floor is drawn with packets: no on-ground check), `sounds` (`open`, `close`, `hover`, `click`, `equip`, `remove`, `error`).

`wardrobe/hud.yml` is the HUD's art and layout, generated with the pack: don't edit it.

## Commands and permissions

| Command            | Permission                                     |
| ------------------ | ---------------------------------------------- |
| `/wardrobe`        | `edcosmetics.wardrobe.use` (default: everyone) |
| `/wardrobe reload` | `edcosmetics.wardrobe.admin` (default: op)     |

## One HUD at a time

The wardrobe, the emote wheel and emotes never open over each other (`busy` message). Other plugins can check the same lock, see [Developer API](/p/edcosmetics/reference/api.md).
