1.8 changed the inheritance structure of Squids, this update resolves issues that cropped up from this change.

This commit is contained in:
t00thpick1 2014-12-18 18:14:51 -05:00
parent 262e711bcc
commit 429a7d926a
2 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,7 @@ package com.gmail.nossr50.runnables.skills;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.entity.Creature;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
@ -11,20 +11,20 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.util.Misc;
public class KrakenAttackTask extends BukkitRunnable {
private Creature kraken;
private LivingEntity kraken;
private Player player;
private Location location;
private final boolean GLOBAL_EFFECTS = AdvancedConfig.getInstance().getKrakenGlobalEffectsEnabled();
private final String DEFEAT_MESSAGE = AdvancedConfig.getInstance().getPlayerDefeatMessage();
private final String ESCAPE_MESSAGE = AdvancedConfig.getInstance().getPlayerEscapeMessage();
public KrakenAttackTask(Creature kraken, Player player) {
this.kraken = kraken;
public KrakenAttackTask(LivingEntity kraken2, Player player) {
this.kraken = kraken2;
this.player = player;
}
public KrakenAttackTask(Creature kraken, Player player, Location location) {
this.kraken = kraken;
public KrakenAttackTask(LivingEntity kraken2, Player player, Location location) {
this.kraken = kraken2;
this.player = player;
this.location = location;
}

View File

@ -15,7 +15,6 @@ import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Fish;
@ -135,7 +134,7 @@ public class FishingManager extends SkillManager {
player.setItemInHand(null);
}
Creature kraken = (Creature) world.spawnEntity(player.getEyeLocation(), (Misc.getRandom().nextInt(100) == 0 ? EntityType.CHICKEN : EntityType.SQUID));
LivingEntity kraken = (LivingEntity) world.spawnEntity(player.getEyeLocation(), (Misc.getRandom().nextInt(100) == 0 ? EntityType.CHICKEN : EntityType.SQUID));
kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());
if (!kraken.isValid()) {