Bukkit/CraftBukkit — pull request #1034 by riking (2013-02-21 00:35:14+00:00)
Title: Add BUKKIT-3641 - Damageable.heal()

https://bukkit.atlassian.net/browse/BUKKIT-3641

Compile checking in progress

(Below copied from discussion on https://github.com/Bukkit/CraftBukkit/commit/2f68cb8b50d87a7f34fde84bae125c69bd920cdc#comments)
- Given a plugin where players are given extra health (Let's say it's some kind of PVP) there are five main tasks to do that I can think of:
- [x] Instant kill (`setHealth(0)`)
- [x] Absolute damage (`damage(3, DamageSource.FOO`)
- [x] Percent damage (`damage( (int) (getMaxHealth() / 20), DamageSource.FOO)`
- [x] Full Heal (`setHealth(getMaxHealth())`)
- [ ] Absolute Heal
- [ ] Percent Heal

Absolute & Percent healing, right now, don't have an available API method (at least not that I can see in CraftLivingEntity) - they have to use setHealth() and are inconvieniced by changing maximum healths.. I think a heal() method is needed and justified.