# Avatar Config

In this section you will learn how to create your avatar .yml configuration.

# Example configuration

The following is an example configuration for the LA_Epic_Statue2 avatar:

LA_Epic_Statue2.yml
version: 2

displayName: 'Epic Statue'
model: 'la_epic_statue'
removalTime: '1m'
nametag: '&e%player% &bAvatar'
permission: 'epicstatue'

icon:
  title: "&6&oEpic Statue!"
  description:
    - "&8&oA Epic Statue..."
  item:
    texture: "eyJ0Z ...(redacted big string)"

# Configuration structure

Here's what every option means:

Option Type Description
version int File version, 2 for LogoutAvatars >=2.0.0.
order int (Optional) Avatar order priority for the GUI, closer to 1 will attempt to appear first.
displayName string The name of the avatar displayed in GUIs (eg. Selector Menu)
protectionRadius int (Optional) The avatar protection radius.
model string The name of the model available in ModelEngine (without the .bbmodel extension)
removalTime string The time the avatar will take before automatically despawning (see below for examples)
nametag string Hologram/Text that will be displayed above the avatar
permission string Permission to use the avatar. This permission will have the prefix logoutavatars.avatar.<perm>
icon icon (Optional) Icon data, described below.
overrides variants (Optional) Variants, described below.

# "removalTime" format

The removalTime option can accept times in three units: seconds(s), minutes(m), hours(h) and a combination of them.
For example, to make it 10 seconds, you can set 10s.
You can also combine multiple units, for example 10m 1s or 20h 5m 10s.

# "icon" format

icon type:

Option Type Description
title string (Optional) The text that will appear in the item representing this avatar. If not set, the value of displayName will be used.
description listOfString (Optional) The description ('lore') that will appear in the item representing this avatar.
item item (Required)

item type:

Option Type Description
material string One of the following Material, for example ACACIA_BOAT.
model-id int The number of an existing CustomModelData, must be used along the material option.
texture string Base64-Encoded skin texture, can be obtained from Minecraft-Heads.com, simply pick a head and scroll down to the For Developers section and copy the text from the Value box.

Here are the three possible combinations for an item:

material-only: A normal vanilla item.

material & model-id: An item with a custom model.

texture: An skull with skin.

# "overrides"/variants format

Since v1.1.0 you can create Avatar variants inside the same avatar configuration file.
Variants can be used to represent an "upgrade" to the base avatar.
This is useful if you want to set different options to certain Groups of players without having to copy & paste the same avatar configuration and tweak its options.

Here's how you do it:

LA_Epic_Statue.yml
#...base config...

# Variants below

overrides:
  vip:
    permission: 'epicstatue.vip'
    model: 'la_epic_statue_vip'
    hologram: '&e%player% &bVIP Avatar'

In the overrides section you can define custom variants, in this example we called it vip, and made it reference to a different model and changed the hologram text, all the other fields from the base configuration were automatically inherited. This variant will be used instead of the base one if a player has the logoutavatars.avatar.epicstatue.vip permission.

The only fields than can be overriden are: protectionRadius, removalTime, nametag, model. Attempting to override other fields will take no effect.

The permission option is a must for variants, if it is not present the whole variant will be ignored.