Attempt to properly update...
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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 = "Disorient Distant",
|
||||
aliases = {"disorientdistant"}
|
||||
)
|
||||
public class DisorientDistant 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) {
|
||||
for (Player p : AbilityUtils.getDistantPlayers(arena, boss.getEntity(), RADIUS)) {
|
||||
Location loc = p.getLocation();
|
||||
loc.setYaw(loc.getYaw() + 45 + AbilityUtils.random.nextInt(270));
|
||||
p.teleport(loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user