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
|
||||
author: garbagemule
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.95.5.34
|
||||
version: 0.95.5.35
|
||||
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
|
||||
commands:
|
||||
ma:
|
||||
|
@ -13,8 +13,7 @@ public class HealthStrategyHeroes implements HealthStrategy
|
||||
double regain = health == p.getMaxHealth() ? p.getMaxHealth() : health - current;
|
||||
|
||||
try {
|
||||
// TODO: Remove cast for 1.6
|
||||
EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, (int) regain, RegainReason.CUSTOM);
|
||||
EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
}
|
||||
catch (Exception e) {} // Because Bukkit is retarded.
|
||||
|
@ -6,7 +6,6 @@ public class HealthStrategyStandard implements HealthStrategy
|
||||
{
|
||||
@Override
|
||||
public void setHealth(Player p, double health) {
|
||||
// TODO: Remove cast for 1.6
|
||||
p.setHealth((int) health);
|
||||
p.setHealth(health);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user