Check out example codes for "change attributes of player spigot". It will help you in understanding the concepts better.

Code Example 1

import org.bukkit.entity.Player;
import org.bukkit.attribute.Attribute;

Player player;
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(aDouble);

Learn ReactJs, React Native from akashmittal.com