spigot heal player

Solutions on MaxInterview for spigot heal player by the best coders in the world

showing results for - "spigot heal player"
Nicolò
19 Feb 2016
1//Set health to maximum(20 = 10 Hearts)
2player.setHealth(20);
3
4//Add a specified amount to the current healt
5if(player.getHealth() + specifiedAmount <= 20){
6	player.setHealth(player.getHealth + specifiedAmount); 
7}
Stéphane
23 May 2019
1if (!player.isDead()) {
2	try {
3		player.setHealth(player.getHealth()+hpToHeal);
4	} catch (Exception exception) { exception.printStackTrace(); }
5}