Leave out 1.6 stuff until a stable release.

This commit is contained in:
garbagemule 2013-07-03 14:00:03 +02:00
parent 4a267f5ab5
commit 55bbd4ff85
4 changed files with 11 additions and 6 deletions

View File

@ -724,6 +724,7 @@ public class ArenaImpl implements Arena
}
private void spawnMounts() {
/* TODO: Uncomment for 1.6
for (Map.Entry<Player,ArenaPlayer> 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) {

View File

@ -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) {

View File

@ -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.

View File

@ -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);
}
}