Checking player's max HP

Started by valmirq on Fri, 01/13/2023 - 17:44

Topic category: Help with modding (Java Edition)

Last seen on 15:40, 20. Jan 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Checking player's max HP
Fri, 01/13/2023 - 17:44

I want to make a procedure to decrease player's max HP on death, so it would work like "player respawns -> check his current max hp -> lower it by 2". I found enough info about changing max hp, but how do i check his current maxhp?
 

Last seen on 10:24, 28. Mar 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Max health is an attribute…
Tue, 01/17/2023 - 15:34

Max health is an attribute so you can try using the "/attribute" command, or write the java code yourself, or use my "Attribute" plugin go mcreator.