From 55bbd4ff85db5b83eb88f91530e475de962e06f6 Mon Sep 17 00:00:00 2001 From: garbagemule Date: Wed, 3 Jul 2013 14:00:03 +0200 Subject: [PATCH] Leave out 1.6 stuff until a stable release. --- src/com/garbagemule/MobArena/ArenaImpl.java | 3 ++- src/com/garbagemule/MobArena/ArenaListener.java | 8 +++++--- .../garbagemule/MobArena/health/HealthStrategyHeroes.java | 3 ++- .../MobArena/health/HealthStrategyStandard.java | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/com/garbagemule/MobArena/ArenaImpl.java b/src/com/garbagemule/MobArena/ArenaImpl.java index 70ad1f1..c222979 100644 --- a/src/com/garbagemule/MobArena/ArenaImpl.java +++ b/src/com/garbagemule/MobArena/ArenaImpl.java @@ -724,6 +724,7 @@ public class ArenaImpl implements Arena } private void spawnMounts() { + /* TODO: Uncomment for 1.6 for (Map.Entry entry : arenaPlayerMap.entrySet()) { ArenaClass arenaClass = entry.getValue().getArenaClass(); if (!arenaClass.hasMount()) continue; @@ -737,7 +738,7 @@ public class ArenaImpl implements Arena horse.setPassenger(p); horse.setHealth(horse.getMaxHealth()); monsterManager.addMount(horse); - } + }*/ } private void removePotionEffects(Player p) { diff --git a/src/com/garbagemule/MobArena/ArenaListener.java b/src/com/garbagemule/MobArena/ArenaListener.java index c14c3db..a962148 100644 --- a/src/com/garbagemule/MobArena/ArenaListener.java +++ b/src/com/garbagemule/MobArena/ArenaListener.java @@ -539,9 +539,10 @@ public class ArenaListener onPetDamage(event, (Wolf) damagee, damager); } // Mount - if (damagee instanceof Horse && monsters.hasMount(damagee)) { + /* TODO: Uncomment for 1.6 + else if (damagee instanceof Horse && monsters.hasMount(damagee)) { onMountDamage(event, (Horse) damagee, damager); - } + }*/ // Player else if (damagee instanceof Player) { onPlayerDamage(event, (Player) damagee, damager); @@ -581,9 +582,10 @@ public class ArenaListener event.setCancelled(true); } + /* TODO: Uncomment for 1.6 private void onMountDamage(EntityDamageEvent event, Horse mount, Entity damager) { - } + }*/ private void onMonsterDamage(EntityDamageEvent event, Entity monster, Entity damager) { if (damager instanceof Player) { diff --git a/src/com/garbagemule/MobArena/health/HealthStrategyHeroes.java b/src/com/garbagemule/MobArena/health/HealthStrategyHeroes.java index 22af62b..f8e0b42 100644 --- a/src/com/garbagemule/MobArena/health/HealthStrategyHeroes.java +++ b/src/com/garbagemule/MobArena/health/HealthStrategyHeroes.java @@ -13,7 +13,8 @@ public class HealthStrategyHeroes implements HealthStrategy double regain = health == p.getMaxHealth() ? p.getMaxHealth() : health - current; try { - EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM); + // TODO: Remove cast for 1.6 + EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, (int) regain, RegainReason.CUSTOM); Bukkit.getPluginManager().callEvent(event); } catch (Exception e) {} // Because Bukkit is retarded. diff --git a/src/com/garbagemule/MobArena/health/HealthStrategyStandard.java b/src/com/garbagemule/MobArena/health/HealthStrategyStandard.java index 4660892..b3ed74a 100644 --- a/src/com/garbagemule/MobArena/health/HealthStrategyStandard.java +++ b/src/com/garbagemule/MobArena/health/HealthStrategyStandard.java @@ -6,6 +6,7 @@ public class HealthStrategyStandard implements HealthStrategy { @Override public void setHealth(Player p, double health) { - p.setHealth(health); + // TODO: Remove cast for 1.6 + p.setHealth((int) health); } }