diff --git a/changelog.md b/changelog.md index bc4f6e6..c47bab7 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ These changes will (most likely) be included in the next version. ## [Unreleased] +- MobArena no longer touches the `flySpeed` player attribute when players join an arena. This should fix issues where a crash would result in players being "locked in the air" when trying to fly outside of the arena. It also introduces compatibility with plugins that use flight to augment player abilities. ## [0.103.1] - 2018-12-31 - Like the other user commands, the permission for `/ma ready` now defaults to true. diff --git a/src/main/java/com/garbagemule/MobArena/steps/SetFlying.java b/src/main/java/com/garbagemule/MobArena/steps/SetFlying.java index d0d0963..f6a16c8 100644 --- a/src/main/java/com/garbagemule/MobArena/steps/SetFlying.java +++ b/src/main/java/com/garbagemule/MobArena/steps/SetFlying.java @@ -5,7 +5,6 @@ import org.bukkit.entity.Player; class SetFlying extends PlayerStep { private boolean allow; private boolean flying; - private float speed; private SetFlying(Player player) { super(player); @@ -15,9 +14,7 @@ class SetFlying extends PlayerStep { public void run() { allow = player.getAllowFlight(); flying = player.isFlying(); - speed = player.getFlySpeed(); - player.setFlySpeed(0); player.setFlying(false); player.setAllowFlight(false); } @@ -26,7 +23,6 @@ class SetFlying extends PlayerStep { public void undo() { player.setAllowFlight(allow); player.setFlying(flying); - player.setFlySpeed(speed); } static StepFactory create() {