Checking player's max HP

Started by valmirq on

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:
  • 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?
 

Last seen on 15:21, 16. Oct 2023
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.