You need a MySQL Database:
Load the plugin, configure the Database in the config file, reload the Plugin.
If you want the players to be able to craft the heart, you have to Set the egg creation to every time the Dragon dies.
You can do this either by using Paper and changing it in the paper.yml or by using a plugin
lssethearts [<player>] <hearts>
lsgethearts [<player>]
lsgetheartitem
lifesteal.* (excludes lifesteal.bypass)
lifesteal.sethearts
lifesteal.gethearts
lifesteal.getheartitem
lifesteal.bypass Excludes you:
Anyone killed by you, does not lose a Heart If you kill someone, you do not gain a Heart If you die, you do not lose a Heart