Unleash the Kraken!

This commit is contained in:
GJ
2013-05-01 21:17:59 -04:00
parent 3322677d32
commit c465546871
5 changed files with 103 additions and 4 deletions

View File

@ -0,0 +1,28 @@
package com.gmail.nossr50.runnables.skills;
import org.bukkit.entity.Player;
import org.bukkit.entity.Squid;
import org.bukkit.scheduler.BukkitRunnable;
public class KrakenAttackTask extends BukkitRunnable {
private Squid kraken;
private Player player;
public KrakenAttackTask(Squid kraken, Player player) {
this.kraken = kraken;
this.player = player;
}
@Override
public void run() {
if (!player.isDead()) {
kraken.teleport(player);
player.damage(1, kraken);
player.getWorld().strikeLightningEffect(player.getLocation());
}
else {
kraken.remove();
this.cancel();
}
}
}