Tutorial on how to create a FRAMES HUD
FRAMES HUDs allows you to create HUDs which have a different texture for each of its possible values.
As you can see I created a configuration file with some settings for the new HUD.
type: FRAMESis used to create a HUD which has different texture, one for each value it can have.
x_position_pixels: 120is used to make the HUD positioned 120 pixels on the right (starting from the center of the screen).
valueattribute is used to decide how many values the HUD can have, in this case from 0 to 5, and the start value is 0.
player_stat_nameis an attribute which attaches the HUD to a custom player attribute which will contain the HUD value between server restarts, it's a custom attribute not a vanilla attribute, name it as you wish.
Important: make sure each possible value of your HUD has a valid texture. In this case values are from 0 to 5 so I have 6 images, one for each value of the HUD.
Create a new yml file and add this code inside, it's used to let ItemsAdder know where your HUD images are and how to show them on the screen.
As you can see they have the same names as previously declared in the
Now you have to create one image file for each of the ones we have specified in the previous file.
Create them in this path (as set in the configuration)
Now try to write this command (change
LoneDevto your player name) to change the HUD value:
/iaplayerstat write LoneDev example_stat float 2
As you can see the HUD value changed to 2! Very good!
To make the HUD value change you can just use the previous
writecommand anywhere, in items events, in other plugins, everywhere.
Last modified 10mo ago