Re-PR for Flight fix (#553)

Added check to prevent multiple instances of Flight being created.
This commit is contained in:
Sobki 2016-08-20 14:10:23 +10:00 committed by OmniCypher
parent 2c7faf8016
commit cec9df3ca7

View file

@ -26,7 +26,11 @@ public class AirFlight extends FlightAbility {
private double hoverY;
public AirFlight(Player player) {
super(player);
super(player);
if (CoreAbility.getAbility(player, AirFlight.class) != null)
return;
this.maxHitsBeforeRemoval = getConfig().getInt("Abilities.Air.Flight.MaxHits");
this.speed = getConfig().getDouble("Abilities.Air.Flight.Speed");
this.firstProgressIteration = true;