From cec9df3ca7950172992afd44ede73074d0a88fe3 Mon Sep 17 00:00:00 2001 From: Sobki Date: Sat, 20 Aug 2016 14:10:23 +1000 Subject: [PATCH] Re-PR for Flight fix (#553) Added check to prevent multiple instances of Flight being created. --- src/com/projectkorra/projectkorra/airbending/AirFlight.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/airbending/AirFlight.java b/src/com/projectkorra/projectkorra/airbending/AirFlight.java index ca4e23d0..54fc9966 100644 --- a/src/com/projectkorra/projectkorra/airbending/AirFlight.java +++ b/src/com/projectkorra/projectkorra/airbending/AirFlight.java @@ -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;