make firejet look cool, also missed null check in surge wall

This commit is contained in:
PhanaticD 2019-01-13 18:15:55 -05:00
parent 09478cc5bf
commit da04657957
3 changed files with 9 additions and 1 deletions

View file

@ -1659,6 +1659,10 @@ public class PKListener implements Listener {
return;
}
}
if (CoreAbility.getAbility(player, FireJet.class) != null) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)

View file

@ -79,6 +79,7 @@ public class FireJet extends FireAbility {
this.time = System.currentTimeMillis();
this.start();
player.setGliding(true);
this.bPlayer.addCooldown(this);
}
}
@ -116,6 +117,7 @@ public class FireJet extends FireAbility {
public void remove() {
super.remove();
flightHandler.removeInstance(this.player, this.getName());
player.setGliding(false);
}
@Override

View file

@ -380,7 +380,9 @@ public class SurgeWall extends WaterAbility {
if (WALL_BLOCKS.containsKey(block)) {
if (this.oldTemps.containsKey(block)) {
final TempBlock tb = TempBlock.get(block);
tb.setType(this.oldTemps.get(block));
if (tb != null) {
tb.setType(this.oldTemps.get(block));
}
} else {
TempBlock.revertBlock(block, Material.AIR);
}