Hello i was wondering how to allow a player to "Gain" a certain amount of health.... This is what i am using right now but it sets there health to full. Code: player.setHealth(20); Is There anyway to allow the player to gain health?
Ok i did that and it says Here is the "Player" event i have ect. Code: Player player = event.getPlayer(); player.sendMessage(ChatColor.WHITE + "[" + ChatColor.GOLD + "You Have Been healed!" + ChatColor.WHITE + "]"); player.setHealth( player.getHealth () +10 );
You're referencing CB; if you have don't have to, reference Bukkit instead. Or: ((Damagable)player).setHealth(0D);