How can I correctly regenerate the health of my entity, and change his name at the same time?

Discussion in 'Plugin Development' started by Arbyzik, Jun 14, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    Arbyzik

    1)How can I correctly regenerate the health of my entity, and change his name at the same time?
    upload_2020-6-14_15-37-54.png

    spawn code upload_2020-6-14_15-40-53.png
     
    Last edited by a moderator: Jun 14, 2020
  2. Offline

    Machine Maker

    Hmm for just plain regeneration, I would just give it the regeneration effect, but if you want to update the name at the same time, you should use a BukkitRunnable that repeats every so often that increments the entities health and updates the nametag. You can read about runnables here.
     
Thread Status:
Not open for further replies.

Share This Page