Skip to content

Customization

DavideBlade edited this page Aug 15, 2024 · 4 revisions

There are three different types of health bars: after a player's name over his head, under the name, over mobs' heads.

Health before and after the name

After the name

Bar mode

There are 6 styles for the players' health bars: you can set in the config a number between 1 and 6. Remember to set this in the config.yml:

player-bars:
  enable: true
  text-mode: false
  display-style: (see below)
Display-style Example
display-style: 1 good health
low health
critical health
display-style: 2 good health
low health
critical health
display-style: 3 good health
low health
critical health
display-style: 4 good health
low health
critical health
display-style: 5 good health
low health
critical health
display-style: 6 good health
low health
critical health
display-style: 7 good health
low health
critical health

Text mode

At the moment text mode is not configurable. It will show like this:
good health
low health
critical health

Under the name

The health is displayed under the player's name. The text you set in config.yml will be after the health value and can't be unique per player (cannot be changed due to minecraft limitations). You can use formatting codes (&4, &l, &n, &k...) and a placeholder <3 that will be replaced by a heart symbol (). Remember to set this in the config:

player-bars:
  enable: true
  below-name:
    enable: true
    text: (see examples below)
Setting Screenshot
text: '&c<3' health bar example
text: '/ 20 &aHP' health bar example
text: '&0&oHealth' health bar example



On mobs

Bars mode

At the moment there are 5 different styles. Remember to set this in the config.yml:

mob-bars:
  enable: true
  display-style: (see below)
  text-mode: false
Display-style Example
display-style: 1 good health
low health
critical health
display-style: 2 good health
low health
critical health
display-style: 3 good health
low health
critical health
display-style: 4 good health
low health
display-style: 5 good health
low health
critical health

Text mode

The health is displayed as text, remember to set this in the config:

mob-bars:
  enable: true
  text-mode: true
  custom-text-enable: false # Custom text mode is explained in the next paragraph

It will appear like this: Text mode health bar

Custom text mode

Here you can set the position of each element, set this in the config:

mob-bars:
  enable: true
  text-mode: true
  custom-text-enable: true
  custom-text: (see below)

Placeholders:

Placeholder Replacement
{name} The name of the mob, which will correspond to the first value found from the following:
  1. Custom name of the mob (e.g. the one set with a name tag)
  2. The custom name set in the locale.yml file
  3. The real (vanilla) name
{health} the current health
{max} the maximum health
<3

Some examples:

Setting Screenshot
custom-text: '{name} &c{health} &4<3' health bar example
custom-text: '{health} &5&lHP' health bar example
custom-text: '{health}/{max}' health bar example
custom-text: '&6{health}/{max} &f- {name}' health bar example



Custom file

Here you can make your custom health bars! There are two similar files: one for players, and one for mobs. You have to set a bar for each stage, you can use color codes and formatting codes. There are some placeholders, because symbols cannot be stored in yaml files:
<3 =
[x] =
[/] =
[*] =
[p] =
[+] =
[++] =

Note: you cannot use placeholders like {name} and {health} here! Use the custom-text instead.
The files are made of 10 (for mobs) and 20 (for players) lines, each one represent the state of the bar at a certain percentage of health.

Example (mobs):

5-percent-bar: '&c5% HP'
10-percent-bar: '&c10% HP'
...

Example (players):

10-percent:
  prefix: '&c'
  suffix: ' 10% HP'
20-percent:
  prefix: '&c'
  suffix: ' 20% HP'
...

Using the color codes as prefix, you'll be able to format the name of a player.