Fix powertools when clicking in air (#1657)

Should restore behaviour prior to #1534 and fix #1622.
This commit is contained in:
md678685 2017-12-06 08:37:52 +00:00 committed by GitHub
parent cdf777384e
commit dcbc106e62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -584,15 +584,15 @@ public class EssentialsPlayerListener implements Listener {
player.sendMessage(tl("bedSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()));
}
}
break;
break;
case LEFT_CLICK_AIR:
if (event.getPlayer().isFlying()) {
final User user = ess.getUser(event.getPlayer());
if (user.isFlyClickJump()) {
useFlyClickJump(user);
break;
}
}
break;
case LEFT_CLICK_BLOCK:
if (event.getItem() != null && event.getItem().getType() != Material.AIR) {
final User user = ess.getUser(event.getPlayer());
@ -600,7 +600,7 @@ public class EssentialsPlayerListener implements Listener {
event.setCancelled(true);
}
}
break;
break;
}
ess.getUser(event.getPlayer()).updateActivity(true);
}