Skip to content

Cosmetics

A cosmetic is an item with its own rules, worn from the cosmetics menu. Items that are not cosmetics can be worn too, and show as they are.

Cosmetics live in plugins/BoxCosmetics/cosmetics/. After you edit them, run /bc reload.

What a cosmetic can be

Four costumes: Santa, a snowman, an astronaut, a diverThe same, turned round

Helmet, chestplate, leggings, boots. A costume over your armour, which still protects you.

Hats on the head and pieces on the backThe same, turned round

Head and Wear. Hats beside the helmet, pieces on the back.

Two of each list, and eight balloonsThe same, turned round

Several at once. Head, Wear and Balloon hold 2 each as shipped; max can be set up to 8.

A pig, a cow and a chicken on leadsThe same, turned round

Balloons. Any item on a lead, or a living mob with show: mob:.

A pharaoh, a viking, a detective and a chef, each holding somethingThe same, turned round

Hands. A staff, a shield, a pan: in the off hand, or the main hand.

ModelEngine models. Set with show: meg:. Their seg_ bones trail behind.

Moving parts. A tail of three seg_ bones, one inside the next.

Accessories. Cosmetics with abilities, in slots of their own. Of cosmetics in one group, the accessory shows first.

Three posed mannequins dressedThe same, turned round

On stands. Every kind also works on BoxStand stands and mannequins.

Common changes

These are the cosmetics server owners make most often. Each snippet is a complete cosmetic: put it in the file that its first line names, or in any other .yml file in the cosmetics folder. Then read the files again, and give the cosmetic's item to a player:

/bc reload
/bc give Steve crown

/bc reload reads every cosmetic again, and /bc give gives Steve the crown's item.

A hat from an ItemsAdder or Nexo item

Write the item plugin's prefix, then the item's id: itemsadder:<namespace>:<id> or nexo:<id>. With slot: head, the hat goes in the Head list. The other plugins and their prefixes are under item.

# cosmetics/hats.yml
crown:
  item: itemsadder:royal:crown    # an ItemsAdder item
  # item: nexo:crown              # the same with a Nexo item
  name: "<gold>Crown"
  slot: head

In game, Steve right-clicks the crown in his hand, and it sits on his head, beside any helmet, and turns with his head.

A model on the back from ModelEngine

show names the ModelEngine model that the wearer shows, and item is the item that players hold and keep. With slot: wear, the model goes in the Wear list, on the body. The full rules are under show.

# cosmetics/back.yml
bat-wings:
  item: FEATHER              # the item players hold and keep
  show: meg:bat_wings        # the ModelEngine model's id
  name: "<dark_gray>Bat Wings"
  slot: wear

In game, the player wears the bat wings on the back, and the model plays its own animations, such as walk, as the player moves (model.animations). Without ModelEngine, the feather shows instead.

A balloon

A balloon is any item on a lead, or a living mob with show: mob:<type>. With slot: balloon, both go in the Balloon list. The full rules are under show, and the settings of every balloon are under Balloons.

# cosmetics/balloons.yml
heart-balloon:               # an item on a lead
  item: nexo:heart_balloon
  name: "<red>Heart Balloon"
  slot: balloon

cow-balloon:                 # a living cow on a lead
  item: LEATHER              # the item players hold and keep
  show: mob:cow
  name: "Cow Balloon"
  slot: balloon

In game, the heart, or a living cow, floats above the player on a lead and follows the player around.

A cosmetic only VIPs can wear

Give the cosmetic a permission, then give that permission to your VIP group. Everyone with the permission has the cosmetic in their Collection, without keeping its item. The full rules are under permission.

# cosmetics/hats.yml
vip-helmet:
  item: GOLDEN_HELMET
  name: "<gold>VIP Helmet"
  slot: helmet
  permission: cosmetics.vip
/lp group vip permission set cosmetics.vip true

In game, a VIP opens the Collection and left-clicks the VIP Helmet to wear it over the real helmet. When a player loses the permission, the helmet comes off within about 2 seconds.

A player who holds the cosmetic's item can wear it too, so do not give the item out with /bc give. This is what the default, permission-locks-item: false, does. With permission-locks-item: true in config.yml, only players with the permission can wear it, item or not. That setting counts for every cosmetic.

A colour players can pick

With dyeable: true, each player picks the colour of their own piece. The colour shows only on items whose model takes a dye tint, such as leather armour, and on a ModelEngine model's tint bones. The full rules are under dyeable.

# cosmetics/hats.yml
dyeable-cap:
  item: LEATHER_HELMET
  name: "Cap"
  slot: helmet
  dyeable: true

In game, the player wears the cap, runs /bc color dyeable-cap, picks a hue and a shade, and clicks Confirm. Everyone sees the cap in that colour.

A cosmetic that casts a MythicMobs skill

Under skills, the cosmetic casts MythicMobs skills, and @self in the skill is the wearer. worn casts the skill as the cosmetic goes on, then again every time the number of ticks after the comma has passed (20 ticks are 1 second). Every state and moment that can cast a skill is under Skills.

# cosmetics/hats.yml
flame-hat:
  item: LEATHER_HELMET
  name: "<red>Flame Hat"
  slot: head
  skills:
    worn: mm:FlameHatSparks, 20    # as it goes on, then every 20 ticks
# plugins/MythicMobs/Skills/cosmetics.yml
FlameHatSparks:
  Skills:
  - particle{p=flame;a=5;hs=0.2;vs=0.1;y=2.1} @self

Run /mm reload to load the new skill, then /bc reload. In game, while the player wears the hat, a few flames appear above the player's head every second.

The cosmetics folder

Put your .yml files directly in the cosmetics folder, with no subfolders and no .yaml files. Each top-level key is one cosmetic, and the key is its name. No cosmetics ship with the plugin: to write your first one, see Getting Started.

# plugins/BoxCosmetics/cosmetics/examples.yml
ufo-hat:                  # the item itself, on the head
  item: itemsadder:alien_pack:ufo_hat
  name: "<green>UFO Hat"
  slot: head

dragon-wings:             # a ModelEngine model on the back
  item: FEATHER
  show: meg:dragon_wings
  slot: wear
  animation:
    fly: 5,10             # 5 ticks in, 10 out

pig-balloon:              # a living pig on a lead
  item: CARROT_ON_A_STICK
  show: mob:pig
  slot: balloon
  • Names must be unique across all files, ignoring case. Files load in alphabetical order.

A cosmetic needs both of these, or it is left out. Keys it takes from a template count too.

  • An item, or a model show (without an item).
  • At least one of show, permission, slot, position, hitbox, hide-lead, hide-armor, enchant, tint, skills, stand-skills, accessory.

Keys

Each key's link opens its full rules. The Takes column says what you may write.

Key Takes Default What it does
item A Minecraft name such as LEATHER_HELMET, or an item plugin's id such as nexo:<id> None The item whose look it borrows
name MiniMessage text The item's own Its name
lore A list of MiniMessage lines, or one line The item's own Lines under its name
show meg:<model>, mob:<type>, or another item The item A model, mob or other item on the wearer
enchant true or false false The enchant glint
tint A colour as "#RRGGBB" None A colour on its item or model
dyeable true or false false The wearer picks its colour
hide-armor helmet, chestplate, leggings, boots None Real armour it hides
slot Slot names, such as head or helmet Any slot Slots it may go in
permission Any permission name None Players with this permission have the cosmetic in their Collection
group Any words, as group names None Only one cosmetic of a group is worn at a time
accessory true or false false true: worn in accessory slots only
position A section for head, wear or balloon The main config's Scale, offset and rotation per list
hitbox width and height, in pixels from 1 to 256 balloon.item.hitbox The box an item balloon bumps with
hide-lead true or false false No lead on the balloon
animation For each animation, ticks in and out, such as 5,10 0,0: it switches at once Ticks each animation blends in and out over
skills For each state or moment, mm:<skill>, and ticks after a comma None MythicMobs skills the wearer casts
stand-skills idle, walk or spawn, each with mm:<skill> None Skills a BoxStand stand casts
wear-sound A /playsound key, a section with sound, or none The main config's Its sound as it goes on
template, exclude A cosmetic's name, and the keys to skip None A cosmetic to take keys from, and the keys to skip

The keys, topic by topic