mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
when firejet is done use previous gliding state
This commit is contained in:
parent
88c1debab9
commit
be896ecf32
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,7 @@ public class FireJet extends FireAbility {
|
||||||
@Attribute(Attribute.SPEED)
|
@Attribute(Attribute.SPEED)
|
||||||
private double speed;
|
private double speed;
|
||||||
private Random random;
|
private Random random;
|
||||||
|
private Boolean previousGlidingState;
|
||||||
|
|
||||||
public FireJet(final Player player) {
|
public FireJet(final Player player) {
|
||||||
super(player);
|
super(player);
|
||||||
|
@ -79,6 +80,7 @@ public class FireJet extends FireAbility {
|
||||||
this.time = System.currentTimeMillis();
|
this.time = System.currentTimeMillis();
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
|
previousGlidingState = player.isGliding();
|
||||||
player.setGliding(true);
|
player.setGliding(true);
|
||||||
this.bPlayer.addCooldown(this);
|
this.bPlayer.addCooldown(this);
|
||||||
}
|
}
|
||||||
|
@ -116,7 +118,7 @@ public class FireJet extends FireAbility {
|
||||||
@Override
|
@Override
|
||||||
public void remove() {
|
public void remove() {
|
||||||
super.remove();
|
super.remove();
|
||||||
this.player.setGliding(false);
|
this.player.setGliding(previousGlidingState);
|
||||||
flightHandler.removeInstance(this.player, this.getName());
|
flightHandler.removeInstance(this.player, this.getName());
|
||||||
this.player.setFallDistance(0);
|
this.player.setFallDistance(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue