diff --git a/src/com/projectkorra/projectkorra/PKListener.java b/src/com/projectkorra/projectkorra/PKListener.java index b268a413..e97528b0 100644 --- a/src/com/projectkorra/projectkorra/PKListener.java +++ b/src/com/projectkorra/projectkorra/PKListener.java @@ -1672,9 +1672,10 @@ public class PKListener implements Listener { return; } } - - if (CoreAbility.getAbility(player, FireJet.class) != null) { - event.setCancelled(true); + if (ConfigManager.getConfig().getBoolean("Abilities.Fire.FireJet.ShowGliding")) { + if (CoreAbility.getAbility(player, FireJet.class) != null) { + event.setCancelled(true); + } } } diff --git a/src/com/projectkorra/projectkorra/configuration/ConfigManager.java b/src/com/projectkorra/projectkorra/configuration/ConfigManager.java index 4d034320..4c3c3f20 100644 --- a/src/com/projectkorra/projectkorra/configuration/ConfigManager.java +++ b/src/com/projectkorra/projectkorra/configuration/ConfigManager.java @@ -817,7 +817,7 @@ public class ConfigManager { config.addDefault("Abilities.Air.AirBurst.AngleTheta", 10); config.addDefault("Abilities.Air.AirScooter.Enabled", true); - config.addDefault("Abilities.Air.AirScooter.ShowSitting", true); + config.addDefault("Abilities.Air.AirScooter.ShowSitting", false); config.addDefault("Abilities.Air.AirScooter.Speed", 0.675); config.addDefault("Abilities.Air.AirScooter.Interval", 100); config.addDefault("Abilities.Air.AirScooter.Radius", 1); @@ -1363,6 +1363,7 @@ public class ConfigManager { config.addDefault("Abilities.Fire.FireJet.Speed", 0.8); config.addDefault("Abilities.Fire.FireJet.Duration", 2000); config.addDefault("Abilities.Fire.FireJet.Cooldown", 7000); + config.addDefault("Abilities.Fire.FireJet.ShowGliding", false); config.addDefault("Abilities.Fire.FireManipulation.Enabled", false); diff --git a/src/com/projectkorra/projectkorra/firebending/FireJet.java b/src/com/projectkorra/projectkorra/firebending/FireJet.java index 5a538753..6d19de01 100644 --- a/src/com/projectkorra/projectkorra/firebending/FireJet.java +++ b/src/com/projectkorra/projectkorra/firebending/FireJet.java @@ -28,6 +28,7 @@ public class FireJet extends FireAbility { private double speed; private Random random; private Boolean previousGlidingState; + private Boolean showGliding; public FireJet(final Player player) { super(player); @@ -49,6 +50,7 @@ public class FireJet extends FireAbility { this.duration = getConfig().getLong("Abilities.Fire.FireJet.Duration"); this.speed = getConfig().getDouble("Abilities.Fire.FireJet.Speed"); this.cooldown = getConfig().getLong("Abilities.Fire.FireJet.Cooldown"); + this.showGliding = getConfig().getBoolean("Abilities.Fire.FireJet.ShowGliding"); this.random = new Random(); this.speed = this.getDayFactor(this.speed); @@ -80,8 +82,10 @@ public class FireJet extends FireAbility { this.time = System.currentTimeMillis(); this.start(); - previousGlidingState = player.isGliding(); - player.setGliding(true); + if (showGliding) { + previousGlidingState = player.isGliding(); + player.setGliding(true); + } this.bPlayer.addCooldown(this); } } @@ -118,7 +122,9 @@ public class FireJet extends FireAbility { @Override public void remove() { super.remove(); - this.player.setGliding(previousGlidingState); + if (showGliding) { + this.player.setGliding(previousGlidingState); + } flightHandler.removeInstance(this.player, this.getName()); this.player.setFallDistance(0); }