mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-25 08:35:27 +02:00
Huge changes to how config files are loaded/updated, fixes many issues
Fixes #4715
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.gmail.nossr50.config.experience;
|
||||
|
||||
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
||||
import com.gmail.nossr50.config.BukkitConfig;
|
||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
@@ -17,7 +17,7 @@ import org.bukkit.entity.EntityType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
public class ExperienceConfig extends BukkitConfig {
|
||||
private static ExperienceConfig instance;
|
||||
|
||||
private ExperienceConfig() {
|
||||
@@ -34,7 +34,8 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {}
|
||||
protected void loadKeys() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean validateKeys() {
|
||||
@@ -139,84 +140,182 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
return noErrorsInConfig(reason);
|
||||
}
|
||||
|
||||
public boolean isEarlyGameBoostEnabled() { return config.getBoolean("EarlyGameBoost.Enabled", true); }
|
||||
public boolean isEarlyGameBoostEnabled() {
|
||||
return config.getBoolean("EarlyGameBoost.Enabled", true);
|
||||
}
|
||||
|
||||
/*
|
||||
* FORMULA SETTINGS
|
||||
*/
|
||||
|
||||
/* EXPLOIT TOGGLES */
|
||||
public boolean isSnowExploitPrevented() { return config.getBoolean("ExploitFix.SnowGolemExcavation", true); }
|
||||
public boolean isEndermanEndermiteFarmingPrevented() { return config.getBoolean("ExploitFix.EndermanEndermiteFarms", true); }
|
||||
public boolean isPistonCheatingPrevented() { return config.getBoolean("ExploitFix.PistonCheating", true); }
|
||||
public boolean isPistonExploitPrevented() { return config.getBoolean("ExploitFix.Pistons", false); }
|
||||
public boolean allowUnsafeEnchantments() { return config.getBoolean("ExploitFix.UnsafeEnchantments", false); }
|
||||
public boolean isCOTWBreedingPrevented() { return config.getBoolean("ExploitFix.COTWBreeding", true); }
|
||||
public boolean isNPCInteractionPrevented() { return config.getBoolean("ExploitFix.PreventPluginNPCInteraction", true); }
|
||||
public boolean isSnowExploitPrevented() {
|
||||
return config.getBoolean("ExploitFix.SnowGolemExcavation", true);
|
||||
}
|
||||
|
||||
public boolean isFishingExploitingPrevented() { return config.getBoolean("ExploitFix.Fishing", true); }
|
||||
public int getFishingExploitingOptionMoveRange() { return config.getInt("Fishing_ExploitFix_Options.MoveRange", 3); }
|
||||
public int getFishingExploitingOptionOverFishLimit() { return config.getInt("Fishing_ExploitFix_Options.OverFishLimit", 10); }
|
||||
public boolean isEndermanEndermiteFarmingPrevented() {
|
||||
return config.getBoolean("ExploitFix.EndermanEndermiteFarms", true);
|
||||
}
|
||||
|
||||
public boolean isAcrobaticsExploitingPrevented() { return config.getBoolean("ExploitFix.Acrobatics", true); }
|
||||
public boolean isTreeFellerXPReduced() { return config.getBoolean("ExploitFix.TreeFellerReducedXP", true); }
|
||||
public boolean isPistonCheatingPrevented() {
|
||||
return config.getBoolean("ExploitFix.PistonCheating", true);
|
||||
}
|
||||
|
||||
public boolean isPistonExploitPrevented() {
|
||||
return config.getBoolean("ExploitFix.Pistons", false);
|
||||
}
|
||||
|
||||
public boolean allowUnsafeEnchantments() {
|
||||
return config.getBoolean("ExploitFix.UnsafeEnchantments", false);
|
||||
}
|
||||
|
||||
public boolean isCOTWBreedingPrevented() {
|
||||
return config.getBoolean("ExploitFix.COTWBreeding", true);
|
||||
}
|
||||
|
||||
public boolean isNPCInteractionPrevented() {
|
||||
return config.getBoolean("ExploitFix.PreventPluginNPCInteraction", true);
|
||||
}
|
||||
|
||||
public boolean isFishingExploitingPrevented() {
|
||||
return config.getBoolean("ExploitFix.Fishing", true);
|
||||
}
|
||||
|
||||
public int getFishingExploitingOptionMoveRange() {
|
||||
return config.getInt("Fishing_ExploitFix_Options.MoveRange", 3);
|
||||
}
|
||||
|
||||
public int getFishingExploitingOptionOverFishLimit() {
|
||||
return config.getInt("Fishing_ExploitFix_Options.OverFishLimit", 10);
|
||||
}
|
||||
|
||||
public boolean isAcrobaticsExploitingPrevented() {
|
||||
return config.getBoolean("ExploitFix.Acrobatics", true);
|
||||
}
|
||||
|
||||
public boolean isTreeFellerXPReduced() {
|
||||
return config.getBoolean("ExploitFix.TreeFellerReducedXP", true);
|
||||
}
|
||||
|
||||
/* Curve settings */
|
||||
public FormulaType getFormulaType() { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve")); }
|
||||
public boolean getCumulativeCurveEnabled() { return config.getBoolean("Experience_Formula.Cumulative_Curve", false); }
|
||||
public FormulaType getFormulaType() {
|
||||
return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve"));
|
||||
}
|
||||
|
||||
public boolean getCumulativeCurveEnabled() {
|
||||
return config.getBoolean("Experience_Formula.Cumulative_Curve", false);
|
||||
}
|
||||
|
||||
/* Curve values */
|
||||
public double getMultiplier(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.multiplier"); }
|
||||
public int getBase(FormulaType type) { return config.getInt("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.base"); }
|
||||
public double getExponent(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.exponent"); }
|
||||
public double getMultiplier(FormulaType type) {
|
||||
return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.multiplier");
|
||||
}
|
||||
|
||||
public int getBase(FormulaType type) {
|
||||
return config.getInt("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.base");
|
||||
}
|
||||
|
||||
public double getExponent(FormulaType type) {
|
||||
return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.exponent");
|
||||
}
|
||||
|
||||
/* Global modifier */
|
||||
public double getExperienceGainsGlobalMultiplier() { return config.getDouble("Experience_Formula.Multiplier.Global", 1.0); }
|
||||
public void setExperienceGainsGlobalMultiplier(double value) { config.set("Experience_Formula.Multiplier.Global", value); }
|
||||
public double getExperienceGainsGlobalMultiplier() {
|
||||
return config.getDouble("Experience_Formula.Multiplier.Global", 1.0);
|
||||
}
|
||||
|
||||
public void setExperienceGainsGlobalMultiplier(double value) {
|
||||
config.set("Experience_Formula.Multiplier.Global", value);
|
||||
}
|
||||
|
||||
/* PVP modifier */
|
||||
public double getPlayerVersusPlayerXP() { return config.getDouble("Experience_Formula.Multiplier.PVP", 1.0); }
|
||||
public double getPlayerVersusPlayerXP() {
|
||||
return config.getDouble("Experience_Formula.Multiplier.PVP", 1.0);
|
||||
}
|
||||
|
||||
/* Spawned Mob modifier */
|
||||
public double getSpawnedMobXpMultiplier() { return config.getDouble("Experience_Formula.Mobspawners.Multiplier", 0.0); }
|
||||
public double getEggXpMultiplier() { return config.getDouble("Experience_Formula.Eggs.Multiplier", 0.0); }
|
||||
public double getTamedMobXpMultiplier() { return config.getDouble("Experience_Formula.Player_Tamed.Multiplier", 0.0); }
|
||||
public double getNetherPortalXpMultiplier() { return config.getDouble("Experience_Formula.Nether_Portal.Multiplier", 0.0); }
|
||||
public double getBredMobXpMultiplier() { return config.getDouble("Experience_Formula.Breeding.Multiplier", 1.0); }
|
||||
public double getSpawnedMobXpMultiplier() {
|
||||
return config.getDouble("Experience_Formula.Mobspawners.Multiplier", 0.0);
|
||||
}
|
||||
|
||||
public double getEggXpMultiplier() {
|
||||
return config.getDouble("Experience_Formula.Eggs.Multiplier", 0.0);
|
||||
}
|
||||
|
||||
public double getTamedMobXpMultiplier() {
|
||||
return config.getDouble("Experience_Formula.Player_Tamed.Multiplier", 0.0);
|
||||
}
|
||||
|
||||
public double getNetherPortalXpMultiplier() {
|
||||
return config.getDouble("Experience_Formula.Nether_Portal.Multiplier", 0.0);
|
||||
}
|
||||
|
||||
public double getBredMobXpMultiplier() {
|
||||
return config.getDouble("Experience_Formula.Breeding.Multiplier", 1.0);
|
||||
}
|
||||
|
||||
/* Skill modifiers */
|
||||
public double getFormulaSkillModifier(PrimarySkillType skill) { return config.getDouble("Experience_Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
||||
public double getFormulaSkillModifier(PrimarySkillType skill) {
|
||||
return config.getDouble("Experience_Formula.Modifier." + StringUtils.getCapitalized(skill.toString()));
|
||||
}
|
||||
|
||||
/* Custom XP perk */
|
||||
public double getCustomXpPerkBoost() { return config.getDouble("Experience_Formula.Custom_XP_Perk.Boost", 1.25); }
|
||||
public double getCustomXpPerkBoost() {
|
||||
return config.getDouble("Experience_Formula.Custom_XP_Perk.Boost", 1.25);
|
||||
}
|
||||
|
||||
/* Diminished Returns */
|
||||
public float getDiminishedReturnsCap() { return (float) config.getDouble("Dimished_Returns.Guaranteed_Minimum_Percentage", 0.05D); }
|
||||
public boolean getDiminishedReturnsEnabled() { return config.getBoolean("Diminished_Returns.Enabled", false); }
|
||||
public int getDiminishedReturnsThreshold(PrimarySkillType skill) { return config.getInt("Diminished_Returns.Threshold." + StringUtils.getCapitalized(skill.toString()), 20000); }
|
||||
public int getDiminishedReturnsTimeInterval() { return config.getInt("Diminished_Returns.Time_Interval", 10); }
|
||||
public float getDiminishedReturnsCap() {
|
||||
return (float) config.getDouble("Dimished_Returns.Guaranteed_Minimum_Percentage", 0.05D);
|
||||
}
|
||||
|
||||
public boolean getDiminishedReturnsEnabled() {
|
||||
return config.getBoolean("Diminished_Returns.Enabled", false);
|
||||
}
|
||||
|
||||
public int getDiminishedReturnsThreshold(PrimarySkillType skill) {
|
||||
return config.getInt("Diminished_Returns.Threshold." + StringUtils.getCapitalized(skill.toString()), 20000);
|
||||
}
|
||||
|
||||
public int getDiminishedReturnsTimeInterval() {
|
||||
return config.getInt("Diminished_Returns.Time_Interval", 10);
|
||||
}
|
||||
|
||||
/* Conversion */
|
||||
public double getExpModifier() { return config.getDouble("Conversion.Exp_Modifier", 1); }
|
||||
public double getExpModifier() {
|
||||
return config.getDouble("Conversion.Exp_Modifier", 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* XP SETTINGS
|
||||
*/
|
||||
|
||||
/* General Settings */
|
||||
public boolean getExperienceGainsPlayerVersusPlayerEnabled() { return config.getBoolean("Experience_Values.PVP.Rewards", true); }
|
||||
public boolean getExperienceGainsPlayerVersusPlayerEnabled() {
|
||||
return config.getBoolean("Experience_Values.PVP.Rewards", true);
|
||||
}
|
||||
|
||||
/* Combat XP Multipliers */
|
||||
public double getCombatXP(EntityType entity) { return config.getDouble("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
||||
public double getAnimalsXP(EntityType entity) { return config.getDouble("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"), getAnimalsXP()); }
|
||||
public double getAnimalsXP() { return config.getDouble("Experience_Values.Combat.Multiplier.Animals", 1.0); }
|
||||
public boolean hasCombatXP(EntityType entity) {return config.contains("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
||||
public double getCombatXP(EntityType entity) {
|
||||
return config.getDouble("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"));
|
||||
}
|
||||
|
||||
public double getAnimalsXP(EntityType entity) {
|
||||
return config.getDouble("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"), getAnimalsXP());
|
||||
}
|
||||
|
||||
public double getAnimalsXP() {
|
||||
return config.getDouble("Experience_Values.Combat.Multiplier.Animals", 1.0);
|
||||
}
|
||||
|
||||
public boolean hasCombatXP(EntityType entity) {
|
||||
return config.contains("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"));
|
||||
}
|
||||
|
||||
/* Materials */
|
||||
public int getXp(PrimarySkillType skill, Material material)
|
||||
{
|
||||
public int getXp(PrimarySkillType skill, Material material) {
|
||||
//TODO: Temporary measure to fix an exploit caused by a yet to be fixed Spigot bug (as of 7/3/2020)
|
||||
if(material.toString().equalsIgnoreCase("LILY_PAD"))
|
||||
if (material.toString().equalsIgnoreCase("LILY_PAD"))
|
||||
return 0;
|
||||
|
||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
@@ -233,8 +332,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Materials */
|
||||
public int getXp(PrimarySkillType skill, BlockState blockState)
|
||||
{
|
||||
public int getXp(PrimarySkillType skill, BlockState blockState) {
|
||||
Material data = blockState.getType();
|
||||
|
||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
@@ -251,8 +349,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Materials */
|
||||
public int getXp(PrimarySkillType skill, Block block)
|
||||
{
|
||||
public int getXp(PrimarySkillType skill, Block block) {
|
||||
Material data = block.getType();
|
||||
|
||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
@@ -269,8 +366,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Materials */
|
||||
public int getXp(PrimarySkillType skill, BlockData data)
|
||||
{
|
||||
public int getXp(PrimarySkillType skill, BlockData data) {
|
||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
||||
if (config.contains(explicitString))
|
||||
@@ -284,8 +380,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, Material data)
|
||||
{
|
||||
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, Material data) {
|
||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
||||
if (config.contains(explicitString))
|
||||
@@ -297,8 +392,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
return config.contains(wildcardString);
|
||||
}
|
||||
|
||||
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, BlockData data)
|
||||
{
|
||||
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, BlockData data) {
|
||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
||||
if (config.contains(explicitString))
|
||||
@@ -314,32 +408,35 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
* Experience Bar Stuff
|
||||
*/
|
||||
|
||||
public boolean isPartyExperienceBarsEnabled()
|
||||
{
|
||||
public boolean isPartyExperienceBarsEnabled() {
|
||||
return config.getBoolean("Experience_Bars.Update.Party", true);
|
||||
}
|
||||
|
||||
public boolean isPassiveGainsExperienceBarsEnabled()
|
||||
{
|
||||
public boolean isPassiveGainsExperienceBarsEnabled() {
|
||||
return config.getBoolean("Experience_Bars.Update.Passive", true);
|
||||
}
|
||||
|
||||
public boolean getDoExperienceBarsAlwaysUpdateTitle()
|
||||
{
|
||||
public boolean getDoExperienceBarsAlwaysUpdateTitle() {
|
||||
return config.getBoolean("Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained.Enable", false) || getAddExtraDetails();
|
||||
}
|
||||
|
||||
public boolean getAddExtraDetails() { return config.getBoolean("Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained.ExtraDetails", false);}
|
||||
public boolean isExperienceBarsEnabled() { return config.getBoolean("Experience_Bars.Enable", true); }
|
||||
public boolean isExperienceBarEnabled(PrimarySkillType primarySkillType) { return config.getBoolean("Experience_Bars."+StringUtils.getCapitalized(primarySkillType.toString())+".Enable", true);}
|
||||
public boolean getAddExtraDetails() {
|
||||
return config.getBoolean("Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained.ExtraDetails", false);
|
||||
}
|
||||
|
||||
public BarColor getExperienceBarColor(PrimarySkillType primarySkillType)
|
||||
{
|
||||
String colorValueFromConfig = config.getString("Experience_Bars."+StringUtils.getCapitalized(primarySkillType.toString())+".Color");
|
||||
public boolean isExperienceBarsEnabled() {
|
||||
return config.getBoolean("Experience_Bars.Enable", true);
|
||||
}
|
||||
|
||||
for(BarColor barColor : BarColor.values())
|
||||
{
|
||||
if(barColor.toString().equalsIgnoreCase(colorValueFromConfig))
|
||||
public boolean isExperienceBarEnabled(PrimarySkillType primarySkillType) {
|
||||
return config.getBoolean("Experience_Bars." + StringUtils.getCapitalized(primarySkillType.toString()) + ".Enable", true);
|
||||
}
|
||||
|
||||
public BarColor getExperienceBarColor(PrimarySkillType primarySkillType) {
|
||||
String colorValueFromConfig = config.getString("Experience_Bars." + StringUtils.getCapitalized(primarySkillType.toString()) + ".Color");
|
||||
|
||||
for (BarColor barColor : BarColor.values()) {
|
||||
if (barColor.toString().equalsIgnoreCase(colorValueFromConfig))
|
||||
return barColor;
|
||||
}
|
||||
|
||||
@@ -347,13 +444,11 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
return BarColor.WHITE;
|
||||
}
|
||||
|
||||
public BarStyle getExperienceBarStyle(PrimarySkillType primarySkillType)
|
||||
{
|
||||
String colorValueFromConfig = config.getString("Experience_Bars."+StringUtils.getCapitalized(primarySkillType.toString())+".BarStyle");
|
||||
public BarStyle getExperienceBarStyle(PrimarySkillType primarySkillType) {
|
||||
String colorValueFromConfig = config.getString("Experience_Bars." + StringUtils.getCapitalized(primarySkillType.toString()) + ".BarStyle");
|
||||
|
||||
for(BarStyle barStyle : BarStyle.values())
|
||||
{
|
||||
if(barStyle.toString().equalsIgnoreCase(colorValueFromConfig))
|
||||
for (BarStyle barStyle : BarStyle.values()) {
|
||||
if (barStyle.toString().equalsIgnoreCase(colorValueFromConfig))
|
||||
return barStyle;
|
||||
}
|
||||
|
||||
@@ -362,29 +457,51 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Acrobatics */
|
||||
public int getDodgeXPModifier() { return config.getInt("Experience_Values.Acrobatics.Dodge", 120); }
|
||||
public int getRollXPModifier() { return config.getInt("Experience_Values.Acrobatics.Roll", 80); }
|
||||
public int getFallXPModifier() { return config.getInt("Experience_Values.Acrobatics.Fall", 120); }
|
||||
public int getDodgeXPModifier() {
|
||||
return config.getInt("Experience_Values.Acrobatics.Dodge", 120);
|
||||
}
|
||||
|
||||
public double getFeatherFallXPModifier() { return config.getDouble("Experience_Values.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
||||
public int getRollXPModifier() {
|
||||
return config.getInt("Experience_Values.Acrobatics.Roll", 80);
|
||||
}
|
||||
|
||||
public int getFallXPModifier() {
|
||||
return config.getInt("Experience_Values.Acrobatics.Fall", 120);
|
||||
}
|
||||
|
||||
public double getFeatherFallXPModifier() {
|
||||
return config.getDouble("Experience_Values.Acrobatics.FeatherFall_Multiplier", 2.0);
|
||||
}
|
||||
|
||||
/* Alchemy */
|
||||
public double getPotionXP(PotionStage stage) { return config.getDouble("Experience_Values.Alchemy.Potion_Stage_" + stage.toNumerical(), 10D); }
|
||||
public double getPotionXP(PotionStage stage) {
|
||||
return config.getDouble("Experience_Values.Alchemy.Potion_Stage_" + stage.toNumerical(), 10D);
|
||||
}
|
||||
|
||||
/* Archery */
|
||||
public double getArcheryDistanceMultiplier() { return config.getDouble("Experience_Values.Archery.Distance_Multiplier", 0.025); }
|
||||
public double getArcheryDistanceMultiplier() {
|
||||
return config.getDouble("Experience_Values.Archery.Distance_Multiplier", 0.025);
|
||||
}
|
||||
|
||||
public int getFishingShakeXP() { return config.getInt("Experience_Values.Fishing.Shake", 50); }
|
||||
public int getFishingShakeXP() {
|
||||
return config.getInt("Experience_Values.Fishing.Shake", 50);
|
||||
}
|
||||
|
||||
/* Repair */
|
||||
public double getRepairXPBase() { return config.getDouble("Experience_Values.Repair.Base", 1000.0); }
|
||||
public double getRepairXP(MaterialType repairMaterialType) { return config.getDouble("Experience_Values.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
||||
public double getRepairXPBase() {
|
||||
return config.getDouble("Experience_Values.Repair.Base", 1000.0);
|
||||
}
|
||||
|
||||
public double getRepairXP(MaterialType repairMaterialType) {
|
||||
return config.getDouble("Experience_Values.Repair." + StringUtils.getCapitalized(repairMaterialType.toString()));
|
||||
}
|
||||
|
||||
/* Taming */
|
||||
public int getTamingXP(EntityType type)
|
||||
{
|
||||
public int getTamingXP(EntityType type) {
|
||||
return config.getInt("Experience_Values.Taming.Animal_Taming." + StringUtils.getPrettyEntityTypeString(type));
|
||||
}
|
||||
|
||||
public boolean preventStoneLavaFarming() { return config.getBoolean("ExploitFix.LavaStoneAndCobbleFarming", true);}
|
||||
public boolean preventStoneLavaFarming() {
|
||||
return config.getBoolean("ExploitFix.LavaStoneAndCobbleFarming", true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user