mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 00:45:27 +01:00
1.8 changed the inheritance structure of Squids, this update resolves issues that cropped up from this change.
This commit is contained in:
parent
262e711bcc
commit
429a7d926a
@ -3,7 +3,7 @@ package com.gmail.nossr50.runnables.skills;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Creature;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@ -11,20 +11,20 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
public class KrakenAttackTask extends BukkitRunnable {
|
public class KrakenAttackTask extends BukkitRunnable {
|
||||||
private Creature kraken;
|
private LivingEntity kraken;
|
||||||
private Player player;
|
private Player player;
|
||||||
private Location location;
|
private Location location;
|
||||||
private final boolean GLOBAL_EFFECTS = AdvancedConfig.getInstance().getKrakenGlobalEffectsEnabled();
|
private final boolean GLOBAL_EFFECTS = AdvancedConfig.getInstance().getKrakenGlobalEffectsEnabled();
|
||||||
private final String DEFEAT_MESSAGE = AdvancedConfig.getInstance().getPlayerDefeatMessage();
|
private final String DEFEAT_MESSAGE = AdvancedConfig.getInstance().getPlayerDefeatMessage();
|
||||||
private final String ESCAPE_MESSAGE = AdvancedConfig.getInstance().getPlayerEscapeMessage();
|
private final String ESCAPE_MESSAGE = AdvancedConfig.getInstance().getPlayerEscapeMessage();
|
||||||
|
|
||||||
public KrakenAttackTask(Creature kraken, Player player) {
|
public KrakenAttackTask(LivingEntity kraken2, Player player) {
|
||||||
this.kraken = kraken;
|
this.kraken = kraken2;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public KrakenAttackTask(Creature kraken, Player player, Location location) {
|
public KrakenAttackTask(LivingEntity kraken2, Player player, Location location) {
|
||||||
this.kraken = kraken;
|
this.kraken = kraken2;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Creature;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Fish;
|
import org.bukkit.entity.Fish;
|
||||||
@ -135,7 +134,7 @@ public class FishingManager extends SkillManager {
|
|||||||
player.setItemInHand(null);
|
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());
|
kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());
|
||||||
|
|
||||||
if (!kraken.isValid()) {
|
if (!kraken.isValid()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user