Add Maces skill
This commit is contained in:
Robert Alan Chapton
2024-06-30 15:10:29 -07:00
committed by GitHub
parent 02c732bdf2
commit 971e5da0ad
38 changed files with 688 additions and 288 deletions

View File

@@ -11,6 +11,7 @@ import java.util.ArrayList;
import java.util.List;
public class AdvancedConfig extends BukkitConfig {
int[] defaultCrippleValues = new int[]{10, 15, 20, 25};
public AdvancedConfig(File dataFolder) {
super("advanced.yml", dataFolder);
@@ -937,4 +938,10 @@ public class AdvancedConfig extends BukkitConfig {
public boolean isKnockOnWoodXPOrbEnabled() {
return config.getBoolean("Skills.Woodcutting.TreeFeller.Knock_On_Wood.Add_XP_Orbs_To_Drops", true);
}
/* MACES */
public double getCrippleChanceToApplyOnHit(int rank) {
String root = "Skills.Maces.Cripple.Chance_To_Apply_On_Hit.Rank_";
return config.getDouble(root + rank, defaultCrippleValues[rank-1]);
}
}

View File

@@ -547,6 +547,10 @@ public class GeneralConfig extends BukkitConfig {
return config.getBoolean("Particles.Bleed", true);
}
public boolean getCrippleEffectEnabled() {
return config.getBoolean("Particles.Cripple", true);
}
public boolean getDodgeEffectEnabled() {
return config.getBoolean("Particles.Dodge", true);
}

View File

@@ -50,12 +50,12 @@ public class SoundConfig extends BukkitConfig {
public float getVolume(SoundType soundType) {
String key = "Sounds." + soundType.toString() + ".Volume";
return (float) config.getDouble(key);
return (float) config.getDouble(key, 1.0);
}
public float getPitch(SoundType soundType) {
String key = "Sounds." + soundType.toString() + ".Pitch";
return (float) config.getDouble(key);
return (float) config.getDouble(key, 1.0);
}
public boolean getIsEnabled(SoundType soundType) {