mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 03:30:10 +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)
|
||||
private double speed;
|
||||
private Random random;
|
||||
private Boolean previousGlidingState;
|
||||
|
||||
public FireJet(final Player player) {
|
||||
super(player);
|
||||
|
@ -79,6 +80,7 @@ public class FireJet extends FireAbility {
|
|||
this.time = System.currentTimeMillis();
|
||||
|
||||
this.start();
|
||||
previousGlidingState = player.isGliding();
|
||||
player.setGliding(true);
|
||||
this.bPlayer.addCooldown(this);
|
||||
}
|
||||
|
@ -116,7 +118,7 @@ public class FireJet extends FireAbility {
|
|||
@Override
|
||||
public void remove() {
|
||||
super.remove();
|
||||
this.player.setGliding(false);
|
||||
this.player.setGliding(previousGlidingState);
|
||||
flightHandler.removeInstance(this.player, this.getName());
|
||||
this.player.setFallDistance(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue