diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 1 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandfly.java | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 6eb3e1134..e5839f104 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -421,6 +421,7 @@ public class EssentialsPlayerListener implements Listener final User user = ess.getUser(event.getPlayer()); if (user.getGameMode() != GameMode.CREATIVE && !user.isAuthorized("essentials.fly")) { + user.setFallDistance(0f); user.setAllowFlight(false); } user.setFlySpeed(0.1f); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfly.java b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java index 43b40a780..8036ba57c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandfly.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java @@ -52,8 +52,9 @@ public class Commandfly extends EssentialsToggleCommand enabled = !user.getAllowFlight(); } + user.setFallDistance(0f); user.setAllowFlight(enabled); - + if (!user.getAllowFlight()) { user.setFlying(false); |