mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +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
1 changed files with 2 additions and 1 deletions
|
@ -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