mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-26 18:11:52 +01:00
Reset fall distance when toggling fly so fall damage is not accidentally applied.
This commit is contained in:
parent
8cba8da516
commit
543672a2a8
@ -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);
|
||||
|
@ -52,8 +52,9 @@ public class Commandfly extends EssentialsToggleCommand
|
||||
enabled = !user.getAllowFlight();
|
||||
}
|
||||
|
||||
user.setFallDistance(0f);
|
||||
user.setAllowFlight(enabled);
|
||||
|
||||
|
||||
if (!user.getAllowFlight())
|
||||
{
|
||||
user.setFlying(false);
|
||||
|
Loading…
Reference in New Issue
Block a user