mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 12:49:32 +00:00
Fixed flight disabling creative flight
Fixed flight disabling flying when the player is in creative or spectator mode.
This commit is contained in:
parent
ab4f017c4f
commit
63f6b420dc
|
@ -3,6 +3,7 @@ package com.projectkorra.projectkorra.airbending;
|
|||
import com.projectkorra.projectkorra.ability.FlightAbility;
|
||||
import com.projectkorra.projectkorra.util.Flight;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -116,7 +117,7 @@ public class AirFlight extends FlightAbility {
|
|||
flight.revert();
|
||||
}
|
||||
player.setFlying(false);
|
||||
player.setAllowFlight(false);
|
||||
player.setAllowFlight(player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue