mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +00:00
Add config option for Lightning on FireJet (#1083)
## Additions * Added a configurable boolean for Lightning called "AllowOnFireJet" with a default of true, which allows the use of Lightning while on FireJet * Closes #1082
This commit is contained in:
parent
c4f60e4e69
commit
0367c92279
2 changed files with 4 additions and 1 deletions
|
@ -1456,6 +1456,7 @@ public class ConfigManager {
|
||||||
config.addDefault("Abilities.Fire.Lightning.SelfHitWater", true);
|
config.addDefault("Abilities.Fire.Lightning.SelfHitWater", true);
|
||||||
config.addDefault("Abilities.Fire.Lightning.SelfHitClose", false);
|
config.addDefault("Abilities.Fire.Lightning.SelfHitClose", false);
|
||||||
config.addDefault("Abilities.Fire.Lightning.ArcOnIce", false);
|
config.addDefault("Abilities.Fire.Lightning.ArcOnIce", false);
|
||||||
|
config.addDefault("Abilities.Fire.Lightning.AllowOnFireJet", true);
|
||||||
|
|
||||||
config.addDefault("Abilities.Fire.WallOfFire.Enabled", true);
|
config.addDefault("Abilities.Fire.WallOfFire.Enabled", true);
|
||||||
config.addDefault("Abilities.Fire.WallOfFire.Range", 3);
|
config.addDefault("Abilities.Fire.WallOfFire.Range", 3);
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class Lightning extends LightningAbility {
|
||||||
private boolean hitIce;
|
private boolean hitIce;
|
||||||
private boolean selfHitWater;
|
private boolean selfHitWater;
|
||||||
private boolean selfHitClose;
|
private boolean selfHitClose;
|
||||||
|
private boolean allowOnFireJet;
|
||||||
@Attribute("ArcOnIce")
|
@Attribute("ArcOnIce")
|
||||||
private boolean arcOnIce;
|
private boolean arcOnIce;
|
||||||
private int waterArcs;
|
private int waterArcs;
|
||||||
|
@ -110,6 +111,7 @@ public class Lightning extends LightningAbility {
|
||||||
this.waterArcs = getConfig().getInt("Abilities.Fire.Lightning.WaterArcs");
|
this.waterArcs = getConfig().getInt("Abilities.Fire.Lightning.WaterArcs");
|
||||||
this.chargeTime = getConfig().getLong("Abilities.Fire.Lightning.ChargeTime");
|
this.chargeTime = getConfig().getLong("Abilities.Fire.Lightning.ChargeTime");
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.Lightning.Cooldown");
|
this.cooldown = getConfig().getLong("Abilities.Fire.Lightning.Cooldown");
|
||||||
|
this.allowOnFireJet = getConfig().getBoolean("Abilities.Fire.Lightning.AllowOnFireJet");
|
||||||
|
|
||||||
this.range = this.getDayFactor(this.range);
|
this.range = this.getDayFactor(this.range);
|
||||||
this.subArcChance = this.getDayFactor(this.subArcChance);
|
this.subArcChance = this.getDayFactor(this.subArcChance);
|
||||||
|
@ -182,7 +184,7 @@ public class Lightning extends LightningAbility {
|
||||||
} else if (!this.bPlayer.canBendIgnoreCooldowns(this)) {
|
} else if (!this.bPlayer.canBendIgnoreCooldowns(this)) {
|
||||||
this.remove();
|
this.remove();
|
||||||
return;
|
return;
|
||||||
} else if (CoreAbility.hasAbility(player, FireJet.class)){
|
} else if (CoreAbility.hasAbility(player, FireJet.class) && !allowOnFireJet){
|
||||||
this.removeWithTasks();
|
this.removeWithTasks();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue