mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-30 14:43:52 +01:00
28 lines
721 B
Java
28 lines
721 B
Java
|
import org.bukkit.Location;
|
||
|
import org.bukkit.entity.Player;
|
||
|
|
||
|
import com.garbagemule.MobArena.framework.Arena;
|
||
|
import com.garbagemule.MobArena.waves.MABoss;
|
||
|
import com.garbagemule.MobArena.waves.ability.*;
|
||
|
|
||
|
@AbilityInfo(
|
||
|
name = "Fetch Distant",
|
||
|
aliases = {"fetchdistant"}
|
||
|
)
|
||
|
public class FetchDistant implements Ability
|
||
|
{
|
||
|
/**
|
||
|
* How far away players must be to be affected by the ability.
|
||
|
*/
|
||
|
private final int RADIUS = 8;
|
||
|
|
||
|
@Override
|
||
|
public void execute(Arena arena, MABoss boss) {
|
||
|
Location bLoc = boss.getEntity().getLocation();
|
||
|
|
||
|
for (Player p : AbilityUtils.getDistantPlayers(arena, boss.getEntity(), RADIUS)) {
|
||
|
p.teleport(bLoc);
|
||
|
}
|
||
|
}
|
||
|
}
|