Skip to content

Commit

Permalink
exit when player is gliding
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Oct 15, 2023
1 parent 545d2d5 commit a080813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void disable() {
private void onPlayerMove(PlayerMoveEvent event) {
Player player = event.getPlayer();
if (!player.getGameMode().equals(GameMode.SURVIVAL)) return;
if (player.isInsideVehicle()) return;
if (player.isInsideVehicle() || player.isGliding()) return;

final Location playerLocation = player.getLocation();
final Block burrowBlock = playerLocation.getBlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public boolean shouldEnable() {
private void onPlayerMove(PlayerMoveEvent event) {
Player player = event.getPlayer();
if (!player.getGameMode().equals(GameMode.SURVIVAL)) return;
if (player.isInsideVehicle()) return;
if (player.isInsideVehicle() || player.isGliding()) return;

final Location playerLocation = player.getLocation();
final Block burrowBlock = playerLocation.getBlock();
Expand Down

0 comments on commit a080813

Please sign in to comment.