Revamped F Stealth

This commit is contained in:
Driftay
2018-09-20 16:55:19 -04:00
parent 496ac17d39
commit e580c7eee9
3 changed files with 14 additions and 38 deletions

View File

@@ -193,19 +193,19 @@ public class CmdFly extends FCommand {
FLocation myfloc = new FLocation(me.getLocation());
Faction toFac = Board.getInstance().getFactionAt(myfloc);
if (!checkBypassPerms(fme, me, toFac)) return;
List<Entity> entities = me.getNearbyEntities(16, 256, 16);
for (int i = 0; i <= entities.size() - 1; i++) {
List<Entity> entities = this.me.getNearbyEntities(16.0D, 256.0D, 16.0D);
for(int i = 0; i <= entities.size() - 1; ++i) {
if (entities.get(i) instanceof Player) {
Player eplayer = (Player) entities.get(i);
Player eplayer = (Player)entities.get(i);
FPlayer efplayer = FPlayers.getInstance().getByPlayer(eplayer);
if (efplayer.getRelationTo(fme) == Relation.ENEMY && !efplayer.isStealthEnabled()) {
fme.msg(TL.COMMAND_FLY_CHECK_ENEMY);
if (efplayer.getRelationTo(this.fme) == Relation.ENEMY && !efplayer.isStealthEnabled()) {
this.fme.msg(TL.COMMAND_FLY_CHECK_ENEMY);
return;
}
}
}
if (args.size() == 0) {
toggleFlight(!fme.isFlying(), me);
} else if (args.size() == 1) {