The Kraken hates boats.

This commit is contained in:
GJ 2013-05-01 22:50:12 -04:00
parent 0033c8864e
commit 5c4c3cf59c

View File

@ -74,6 +74,14 @@ public class FishingManager extends SkillManager {
World world = player.getWorld(); World world = player.getWorld();
player.setPlayerWeather(WeatherType.DOWNFALL); player.setPlayerWeather(WeatherType.DOWNFALL);
Entity vehicle = player.getVehicle();
if (vehicle != null && vehicle.getType() == EntityType.BOAT) {
vehicle.eject();
vehicle.remove();
}
player.teleport(player.getTargetBlock(null, 100).getLocation(), TeleportCause.PLUGIN); player.teleport(player.getTargetBlock(null, 100).getLocation(), TeleportCause.PLUGIN);
Location location = player.getLocation(); Location location = player.getLocation();
@ -91,6 +99,8 @@ public class FishingManager extends SkillManager {
kraken.setHealth(kraken.getMaxHealth()); kraken.setHealth(kraken.getMaxHealth());
player.setItemInHand(null); player.setItemInHand(null);
new KrakenAttackTask(kraken, player).runTaskTimer(mcMMO.p, 20L, 20L); new KrakenAttackTask(kraken, player).runTaskTimer(mcMMO.p, 20L, 20L);
fishingTries = 1; fishingTries = 1;
return true; return true;