Merge pull request #63

Silent lightning option
This commit is contained in:
Will FP 2021-09-14 10:17:57 +01:00 committed by GitHub
commit f791512c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 5 deletions

View File

@ -48,7 +48,7 @@ allprojects {
}
dependencies {
compileOnly 'com.willfp:eco:6.6.0'
compileOnly 'com.willfp:eco:6.7.5'
compileOnly 'org.jetbrains:annotations:19.0.0'

View File

@ -33,6 +33,7 @@ public class Electroshock extends EcoEnchant {
return;
}
LightningUtils.strike(attacker, damage);
boolean silent = this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "local-lightning-sound");
LightningUtils.strike(attacker, damage, silent);
}
}

View File

@ -36,6 +36,7 @@ public class Thor extends EcoEnchant {
double damage = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "lightning-damage");
LightningUtils.strike(victim, damage);
boolean silent = this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "local-lightning-sound");
LightningUtils.strike(attacker, damage, silent);
}
}

View File

@ -34,6 +34,7 @@ public class Zeus extends EcoEnchant {
double damage = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "lightning-damage");
LightningUtils.strike(victim, damage);
boolean silent = this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "local-lightning-sound");
LightningUtils.strike(victim, damage, silent);
}
}

View File

@ -35,6 +35,7 @@ public class Bolt extends EcoEnchant {
double damage = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "lightning-damage");
LightningUtils.strike(victim, damage);
boolean silent = this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "local-lightning-sound");
LightningUtils.strike(victim, damage, silent);
}
}

View File

@ -22,5 +22,6 @@ general-config:
maximum-level: 3
config:
local-lightning-sound: false # Should be lightning sound played locally
chance-per-level: 5
damage: 4

View File

@ -25,6 +25,7 @@ general-config:
maximum-level: 6
config:
local-lightning-sound: false # Should be lightning sound played locally
chance-per-level: 2
allow-not-fully-charged: false # dont require sword attack to be at full charge
lightning-damage: 2.5

View File

@ -26,5 +26,6 @@ general-config:
maximum-level: 6
config:
local-lightning-sound: false # Should be lightning sound played locally
chance-per-level: 1
lightning-damage: 2.5

View File

@ -25,6 +25,7 @@ general-config:
maximum-level: 4
config:
local-lightning-sound: false # Should be lightning sound played locally
chance-per-level: 5
allow-not-fully-charged: false # dont require sword attack to be at full charge
lightning-damage: 8