mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 04:55:25 +01:00
Health updates for 1.6
This commit is contained in:
parent
5b2b64d8de
commit
24caeab24f
@ -1,7 +1,7 @@
|
|||||||
name: MobArena
|
name: MobArena
|
||||||
author: garbagemule
|
author: garbagemule
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.95.5.34
|
version: 0.95.5.35
|
||||||
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
|
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
|
||||||
commands:
|
commands:
|
||||||
ma:
|
ma:
|
||||||
|
@ -13,8 +13,7 @@ public class HealthStrategyHeroes implements HealthStrategy
|
|||||||
double regain = health == p.getMaxHealth() ? p.getMaxHealth() : health - current;
|
double regain = health == p.getMaxHealth() ? p.getMaxHealth() : health - current;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// TODO: Remove cast for 1.6
|
EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);
|
||||||
EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, (int) regain, RegainReason.CUSTOM);
|
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
}
|
}
|
||||||
catch (Exception e) {} // Because Bukkit is retarded.
|
catch (Exception e) {} // Because Bukkit is retarded.
|
||||||
|
@ -6,7 +6,6 @@ public class HealthStrategyStandard implements HealthStrategy
|
|||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void setHealth(Player p, double health) {
|
public void setHealth(Player p, double health) {
|
||||||
// TODO: Remove cast for 1.6
|
p.setHealth(health);
|
||||||
p.setHealth((int) health);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user