Checking player's max HP

Started by valmirq on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Checking player's max HP

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?
 

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.