#
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:
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:
#
"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
.
Setting to 0s
will make the avatar only despawn when the player reconnects.
#
"icon" format
icon
type:
item
type:
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:
#...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.
ProTip: you can copy and paste an existing avatar config/model and work based on it.