how to change attribute of minecraft player spigot api code example
Example: change attributes of player spigot
import org.bukkit.entity.Player;
import org.bukkit.attribute.Attribute;
Player player;
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(aDouble);