Remove double negatives in toggleFly()
This commit is contained in:
parent
3c5d8ee050
commit
2cb2068825
@ -193,21 +193,20 @@ public class CmdFly extends FCommand {
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
toggleFlight(!fme.isFlying(), me);
|
||||
toggleFlight(fme.isFlying(), me);
|
||||
} else if (args.size() == 1) {
|
||||
toggleFlight(argAsBool(0), me);
|
||||
}
|
||||
}
|
||||
|
||||
private void toggleFlight(final boolean toggle, final Player player) {
|
||||
if (!toggle) {
|
||||
if (toggle) {
|
||||
fme.setFlying(false);
|
||||
flyMap.remove(player.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
if (fme.canFlyAtLocation())
|
||||
|
||||
this.doWarmUp(WarmUpUtil.Warmup.FLIGHT, TL.WARMUPS_NOTIFY_FLIGHT, "Fly", () -> {
|
||||
fme.setFlying(true);
|
||||
flyMap.put(player.getName(), true);
|
||||
|
Loading…
Reference in New Issue
Block a user