Revamped F Stealth
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user