From 81257b8a39a6a00fc7cef83d1233d20d9d305324 Mon Sep 17 00:00:00 2001 From: tastybento Date: Wed, 31 May 2017 08:28:40 -0700 Subject: [PATCH] Fixes bug https://github.com/tastybento/ASkyBlock-Bugs-N-Features/issues/252 Version up. --- pom.xml | 2 +- .../wasteofplastic/askyblock/listeners/PlayerEvents.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 29ba5e51a..849c7eb30 100644 --- a/pom.xml +++ b/pom.xml @@ -196,5 +196,5 @@ http://maven.sk89q.com/repo/ - 3.0.6.7 + 3.0.6.8 diff --git a/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java b/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java index 5526e02c4..d85d50865 100644 --- a/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java +++ b/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java @@ -347,9 +347,11 @@ public void onPlayerLeave(PlayerQuitEvent event){ } temporaryPerms.remove(player.getUniqueId()); } - if (player.getGameMode().equals(GameMode.SURVIVAL)) { - player.setAllowFlight(false); - player.setFlying(false); + if(VaultHelper.checkPerm(player, Settings.PERMPREFIX + "islandfly")) { + if (player.getGameMode().equals(GameMode.SURVIVAL)) { + player.setAllowFlight(false); + player.setFlying(false); + } } final Island island = plugin.getGrid().getProtectedIslandAt(event.getPlayer().getLocation()); if (island != null) {