Permalink
Browse files

Prevent issues with the flight component where a player must toggle f…

…light twice to regain flight
  • Loading branch information...
DarkArc committed Jul 21, 2014
1 parent c42f93a commit 27fea56bf187b6fe34b62d09f5affa95100b1c6d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/sk89q/commandbook/FlightComponent.java
@@ -60,7 +60,7 @@ public void fly(CommandContext args, CommandSender sender) throws CommandExcepti
for (Player player : targets) {
FlightSession session = sessions.getSession(FlightSession.class, player);
- session.canFly = !session.canFly;
+ session.canFly = session.canFly && !player.getAllowFlight() || !session.canFly;
player.setAllowFlight(session.canFly);
if (!included && player.equals(sender)) {
included = true;

0 comments on commit 27fea56

Please sign in to comment.