Skip to content

Permissions

Every player may open the menu, the Collection, the showcase and the dressing rooms. Ops may also use every other command, every slot for any item, and every button. Give the other nodes with a permissions plugin such as LuckPerms.

Common tasks

These are the permission changes server owners make most often. Each one is a LuckPerms line to type in chat or in the console.

Let every player put any item in the Head slot

Give the slot's node to your default group:

/lp group default permission set boxcosmetics.head true

Every player can now put any item in the Head list, not only cosmetics. Instead, you can set the slot's switch to false, then run /bc reload:

# config.yml
head:
  require-permission: false

The full rules are under Open a slot to everyone.

Let VIPs wear 4 hats

/lp group vip permission set boxcosmetics.head.limit.4 true

Players in the vip group can wear 4 items in the Head list, instead of the 2 that max allows. The full rules are under Limits.

Make a cosmetic for one rank only

Give the cosmetic a permission, then give that permission to the rank:

# cosmetics/hats.yml
fire-hat:
  item: LEATHER_HELMET
  slot: head
  permission: cosmetics.fire
/lp group vip permission set cosmetics.fire true

Every player in the vip group finds the Fire Hat in their Collection and can wear it. Other players do not have it, unless someone gives them its item. To keep them from wearing a given item too, set permission-locks-item: true. The full rules are under Cosmetic permissions.

Make someone an admin

/lp group admin permission set boxcosmetics.admin true
/lp user Steve permission set boxcosmetics.admin true

The first line is for a group, and the second for one player. An admin can run every command, open other players' menus, and use every slot and button. boxcosmetics.admin does not include the limit, duplicate and cosmetic nodes. The full list is under All nodes at a glance.

All nodes at a glance

Node Default Switch (shipped value) What it allows
boxcosmetics.use everyone /bc, your Collection, /bc color, right-clicking a cosmetic and the inventory shortcuts
boxcosmetics.showcase everyone /bc showcase, and the Collection's Cosmetics button
boxcosmetics.dressingroom everyone /bc dressingroom, and walking into a dressing room's door
boxcosmetics.admin op Other commands, every slot and button node
boxcosmetics.<slot> op See below (true) Any item in that slot
boxcosmetics.view op view.require-permission (true) HIDE OTHERS and HIDE ALL
boxcosmetics.color.vanilla op vanilla-color.require-permission (true) Palettes on leather armour and other dyeable items
boxcosmetics.color.tagged op tagged-color.require-permission (false) Palettes on items tagged boxcosmetics:dyeable
boxcosmetics.<slot>.limit.<n> only when given A list size of n (Limits)
boxcosmetics.duplicate, boxcosmetics.<slot>.duplicate nobody Duplicates
The name in a cosmetic's permission: not registered That cosmetic
  • A node is checked only while its switch in config.yml is true. With false, every player may do what the node allows, without the node.
  • boxcosmetics.admin includes boxcosmetics.use, and an admin may use the showcase without boxcosmetics.showcase, and the dressing rooms without boxcosmetics.dressingroom. It does not include the limit, duplicate and cosmetic nodes.
  • <slot> is head, wear or balloon, whose switch is <slot>.require-permission, or helmet, chestplate, leggings, boots, hand or offhand, whose switch is equipment.<slot>.require-permission. The limit and duplicate nodes take other slot names: see Limits and Duplicates.
The whole file
plugin.yml
name: BoxCosmetics
version: '${version}'
main: com.lunggolfs.boxcosmetics.BoxCosmeticsPlugin
api-version: '1.21'
description: Wearables and balloons worn by players - ModelEngine models, items and mobs
authors: [lunggolfs]
depend: [packetevents]
softdepend: [ModelEngine, ItemsAdder, Nexo, Oraxen, CraftEngine, MythicMobs, MythicCrucible, PlaceholderAPI, floodgate, Geyser-Spigot]
commands:
  boxcosmetics:
    aliases: [bc]
    description: Open the cosmetics menu or the collection, put a cosmetic on a player, give a cosmetic's item, or reload the config
    usage: /boxcosmetics [open|head|wear|balloon|give|showcase|dressingroom|cosmetics|collection|equip|unequip|toggle|store|withdraw|reload]
permissions:
  boxcosmetics.use:
    default: true
    description: /boxcosmetics, the player's own cosmetics menu, and their own collection (collection, equip, unequip, toggle, store, withdraw)
  boxcosmetics.head:
    default: op
    description: The menu's head slot (head.require-permission)
  boxcosmetics.helmet:
    default: op
    description: The menu's helmet slot (equipment.helmet.require-permission)
  boxcosmetics.chestplate:
    default: op
    description: The menu's chestplate slot (equipment.chestplate.require-permission)
  boxcosmetics.leggings:
    default: op
    description: The menu's leggings slot (equipment.leggings.require-permission)
  boxcosmetics.boots:
    default: op
    description: The menu's boots slot (equipment.boots.require-permission)
  boxcosmetics.hand:
    default: op
    description: The menu's hand slot (equipment.hand.require-permission)
  boxcosmetics.offhand:
    default: op
    description: The menu's offhand slot (equipment.offhand.require-permission)
  boxcosmetics.wear:
    default: op
    description: The menu's wear slot (wear.require-permission)
  boxcosmetics.balloon:
    default: op
    description: The menu's balloon slot (balloon.require-permission)
  boxcosmetics.color.vanilla:
    default: op
    description: The palette on any item that takes a dye, such as leather armor or an item plugin's dyed item (vanilla-color.require-permission)
  boxcosmetics.color.tagged:
    default: op
    description: The palette on an item tagged boxcosmetics:dyeable (tagged-color.require-permission)
  boxcosmetics.view:
    default: op
    description: HIDE OTHERS and HIDE ALL on the menu's view button (view.require-permission)
  boxcosmetics.duplicate:
    default: false
    description: The same item twice in the head, wear and balloon lists, whatever <slot>.duplicates says
    children:
      boxcosmetics.head.duplicate: true
      boxcosmetics.wear.duplicate: true
      boxcosmetics.balloon.duplicate: true
  boxcosmetics.head.duplicate:
    default: false
    description: The same item twice in the head list (head.duplicates)
  boxcosmetics.wear.duplicate:
    default: false
    description: The same item twice in the wear list (wear.duplicates)
  boxcosmetics.balloon.duplicate:
    default: false
    description: The same item or mob twice in the balloon list (balloon.duplicates)
  boxcosmetics.accessory-head.duplicate:
    default: false
    description: The same item twice in the accessory head list (head.duplicates)
  boxcosmetics.accessory-wear.duplicate:
    default: false
    description: The same item twice in the accessory wear list (wear.duplicates)
  boxcosmetics.accessory-balloon.duplicate:
    default: false
    description: The same item or mob twice in the accessory balloon list (balloon.duplicates)
  boxcosmetics.showcase:
    default: true
    description: /boxcosmetics showcase, the cosmetics showcase (config.yml showcase)
  boxcosmetics.dressingroom:
    default: true
    description: /boxcosmetics dressingroom, and walking into a dressing room's door (config.yml dressing-rooms)
  boxcosmetics.admin:
    default: op
    description: Anyone's menu, and every other /boxcosmetics command
    children:
      boxcosmetics.use: true
      boxcosmetics.head: true
      boxcosmetics.helmet: true
      boxcosmetics.chestplate: true
      boxcosmetics.leggings: true
      boxcosmetics.boots: true
      boxcosmetics.hand: true
      boxcosmetics.offhand: true
      boxcosmetics.wear: true
      boxcosmetics.balloon: true
      boxcosmetics.view: true
      boxcosmetics.color.vanilla: true
      boxcosmetics.color.tagged: true

Slot and button permissions

  • Without its node, a slot still takes cosmetics. Other items are refused with the cosmetic-only message.
  • When a player loses the node, the other items stop showing on them but stay in the slot. They show again once the player has the node again.
  • FOV, Action Hide and the accessory slots need no node.
  • A slot removed in menus/wardrobe.yml is closed to everyone. At the next join or /bc reload, what a player had there goes into their Collection, or else their inventory.

Open a slot to everyone

Set the slot's switch to false, then run /bc reload. Or give the node to your default group:

/lp group default permission set boxcosmetics.head true

Another player's menu

In /bc open <player>, the viewer's nodes count for slots and buttons. The wearer's nodes count for list sizes, duplicates and cosmetics. An item that is no cosmetic shows on the wearer only while the wearer has the slot's node.

Limits

boxcosmetics.<slot>.limit.<n> raises a Head, Wear or Balloon max (2) to n, up to 8:

/lp group vip permission set boxcosmetics.balloon.limit.8 true
  • <slot> is head, wear or balloon, and <n> is a whole number. A number above 8 counts as 8. The accessory slots and the equipment slots take no limit node.
  • If a player has several limits, the highest wins. A limit below max does nothing, and .limit.* does not count.
  • Ops do not get limits. A lowered limit takes nothing off.

Duplicates

A list refuses an item that it already holds (duplicates, shipped false). boxcosmetics.<slot>.duplicate allows it in that one list, and boxcosmetics.duplicate in the Head, Wear and Balloon lists. A refusal shows the already-item message.

/lp group vip permission set boxcosmetics.balloon.duplicate true
  • <slot> is head, wear or balloon, or an accessory slot: accessory-head, accessory-wear or accessory-balloon. An accessory slot follows the duplicates switch of its main list: accessory-head follows head.duplicates, and so on.
  • boxcosmetics.duplicate does not cover the accessory slots. For an accessory slot, give its own node, such as boxcosmetics.accessory-head.duplicate.

Cosmetic permissions

A cosmetic's permission: takes any name. BoxCosmetics does not register it, so give it to the groups that should wear the cosmetic.

  • Test with a player who is not op, as ops may hold the permission anyway.
  • On stands: BoxStand permissions.