|
@@ -87,18 +87,18 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
/* Alchemy */
|
|
/* Alchemy */
|
|
for (PotionStage potionStage : PotionStage.values()) {
|
|
for (PotionStage potionStage : PotionStage.values()) {
|
|
if (getPotionXP(potionStage) < 0) {
|
|
if (getPotionXP(potionStage) < 0) {
|
|
- reason.add("Experience.Alchemy.Potion_Stage_" + potionStage.toNumerical() + " should be at least 0!");
|
|
|
|
|
|
+ reason.add("Experience_114.Alchemy.Potion_Stage_" + potionStage.toNumerical() + " should be at least 0!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/* Archery */
|
|
/* Archery */
|
|
if (getArcheryDistanceMultiplier() < 0) {
|
|
if (getArcheryDistanceMultiplier() < 0) {
|
|
- reason.add("Experience.Archery.Distance_Multiplier should be at least 0!");
|
|
|
|
|
|
+ reason.add("Experience_114.Archery.Distance_Multiplier should be at least 0!");
|
|
}
|
|
}
|
|
|
|
|
|
/* Combat XP Multipliers */
|
|
/* Combat XP Multipliers */
|
|
if (getAnimalsXP() < 0) {
|
|
if (getAnimalsXP() < 0) {
|
|
- reason.add("Experience.Combat.Multiplier.Animals should be at least 0!");
|
|
|
|
|
|
+ reason.add("Experience_114.Combat.Multiplier.Animals should be at least 0!");
|
|
}
|
|
}
|
|
|
|
|
|
if (getDodgeXPModifier() < 0) {
|
|
if (getDodgeXPModifier() < 0) {
|
|
@@ -117,21 +117,21 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
// TODO: Add validation for each fish type once enum is available.
|
|
// TODO: Add validation for each fish type once enum is available.
|
|
|
|
|
|
if (getFishingShakeXP() <= 0) {
|
|
if (getFishingShakeXP() <= 0) {
|
|
- reason.add("Experience.Fishing.Shake should be greater than 0!");
|
|
|
|
|
|
+ reason.add("Experience_114.Fishing.Shake should be greater than 0!");
|
|
}
|
|
}
|
|
|
|
|
|
/* Repair */
|
|
/* Repair */
|
|
if (getRepairXPBase() <= 0) {
|
|
if (getRepairXPBase() <= 0) {
|
|
- reason.add("Experience.Repair.Base should be greater than 0!");
|
|
|
|
|
|
+ reason.add("Experience_114.Repair.Base should be greater than 0!");
|
|
}
|
|
}
|
|
|
|
|
|
/* Taming */
|
|
/* Taming */
|
|
if (getTamingXP(EntityType.WOLF) <= 0) {
|
|
if (getTamingXP(EntityType.WOLF) <= 0) {
|
|
- reason.add("Experience.Taming.Animal_Taming.Wolf should be greater than 0!");
|
|
|
|
|
|
+ reason.add("Experience_114.Taming.Animal_Taming.Wolf should be greater than 0!");
|
|
}
|
|
}
|
|
|
|
|
|
if (getTamingXP(EntityType.OCELOT) <= 0) {
|
|
if (getTamingXP(EntityType.OCELOT) <= 0) {
|
|
- reason.add("Experience.Taming.Animal_Taming.Ocelot should be greater than 0!");
|
|
|
|
|
|
+ reason.add("Experience_114.Taming.Animal_Taming.Ocelot should be greater than 0!");
|
|
}
|
|
}
|
|
|
|
|
|
return noErrorsInConfig(reason);
|
|
return noErrorsInConfig(reason);
|
|
@@ -143,6 +143,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
|
|
|
|
/* EXPLOIT TOGGLES */
|
|
/* EXPLOIT TOGGLES */
|
|
public boolean isEndermanEndermiteFarmingPrevented() { return config.getBoolean("ExploitFix.EndermanEndermiteFarms", true); }
|
|
public boolean isEndermanEndermiteFarmingPrevented() { return config.getBoolean("ExploitFix.EndermanEndermiteFarms", true); }
|
|
|
|
+ public boolean isPistonExploitPrevented() { return config.getBoolean("ExploitFix.Pistons", false); }
|
|
|
|
|
|
public boolean isFishingExploitingPrevented() { return config.getBoolean("ExploitFix.Fishing", true); }
|
|
public boolean isFishingExploitingPrevented() { return config.getBoolean("ExploitFix.Fishing", true); }
|
|
public boolean isAcrobaticsExploitingPrevented() { return config.getBoolean("ExploitFix.Acrobatics", true); }
|
|
public boolean isAcrobaticsExploitingPrevented() { return config.getBoolean("ExploitFix.Acrobatics", true); }
|
|
@@ -187,18 +188,18 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
*/
|
|
*/
|
|
|
|
|
|
/* General Settings */
|
|
/* General Settings */
|
|
- public boolean getExperienceGainsPlayerVersusPlayerEnabled() { return config.getBoolean("Experience.PVP.Rewards", true); }
|
|
|
|
|
|
+ public boolean getExperienceGainsPlayerVersusPlayerEnabled() { return config.getBoolean("Experience_114.PVP.Rewards", true); }
|
|
|
|
|
|
/* Combat XP Multipliers */
|
|
/* Combat XP Multipliers */
|
|
- public double getCombatXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
|
|
|
- public double getAnimalsXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"), getAnimalsXP()); }
|
|
|
|
- public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
|
|
|
|
- public boolean hasCombatXP(EntityType entity) {return config.contains("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
|
|
|
|
|
+ public double getCombatXP(EntityType entity) { return config.getDouble("Experience_114.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
|
|
|
+ public double getAnimalsXP(EntityType entity) { return config.getDouble("Experience_114.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_"), getAnimalsXP()); }
|
|
|
|
+ public double getAnimalsXP() { return config.getDouble("Experience_114.Combat.Multiplier.Animals", 1.0); }
|
|
|
|
+ public boolean hasCombatXP(EntityType entity) {return config.contains("Experience_114.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
|
|
|
|
|
/* Materials */
|
|
/* Materials */
|
|
public int getXp(PrimarySkillType skill, Material data)
|
|
public int getXp(PrimarySkillType skill, Material data)
|
|
{
|
|
{
|
|
- String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
|
|
|
|
+ String baseString = "Experience_114." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
|
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
|
if (config.contains(explicitString))
|
|
if (config.contains(explicitString))
|
|
return config.getInt(explicitString);
|
|
return config.getInt(explicitString);
|
|
@@ -214,7 +215,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
/* Materials */
|
|
/* Materials */
|
|
public int getXp(PrimarySkillType skill, BlockData data)
|
|
public int getXp(PrimarySkillType skill, BlockData data)
|
|
{
|
|
{
|
|
- String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
|
|
|
|
+ String baseString = "Experience_114." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
|
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
|
if (config.contains(explicitString))
|
|
if (config.contains(explicitString))
|
|
return config.getInt(explicitString);
|
|
return config.getInt(explicitString);
|
|
@@ -229,7 +230,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
|
|
|
|
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, Material data)
|
|
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, Material data)
|
|
{
|
|
{
|
|
- String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
|
|
|
|
+ String baseString = "Experience_114." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
|
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
|
if (config.contains(explicitString))
|
|
if (config.contains(explicitString))
|
|
return true;
|
|
return true;
|
|
@@ -242,7 +243,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
|
|
|
|
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, BlockData data)
|
|
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, BlockData data)
|
|
{
|
|
{
|
|
- String baseString = "Experience." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
|
|
|
|
+ String baseString = "Experience_114." + StringUtils.getCapitalized(skill.toString()) + ".";
|
|
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
|
String explicitString = baseString + StringUtils.getExplicitConfigBlockDataString(data);
|
|
if (config.contains(explicitString))
|
|
if (config.contains(explicitString))
|
|
return true;
|
|
return true;
|
|
@@ -305,27 +306,27 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|
}
|
|
}
|
|
|
|
|
|
/* Acrobatics */
|
|
/* Acrobatics */
|
|
- public int getDodgeXPModifier() { return config.getInt("Experience.Acrobatics.Dodge", 120); }
|
|
|
|
- public int getRollXPModifier() { return config.getInt("Experience.Acrobatics.Roll", 80); }
|
|
|
|
- public int getFallXPModifier() { return config.getInt("Experience.Acrobatics.Fall", 120); }
|
|
|
|
|
|
+ public int getDodgeXPModifier() { return config.getInt("Experience_114.Acrobatics.Dodge", 120); }
|
|
|
|
+ public int getRollXPModifier() { return config.getInt("Experience_114.Acrobatics.Roll", 80); }
|
|
|
|
+ public int getFallXPModifier() { return config.getInt("Experience_114.Acrobatics.Fall", 120); }
|
|
|
|
|
|
- public double getFeatherFallXPModifier() { return config.getDouble("Experience.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
|
|
|
|
|
+ public double getFeatherFallXPModifier() { return config.getDouble("Experience_114.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
|
|
|
|
|
/* Alchemy */
|
|
/* Alchemy */
|
|
- public double getPotionXP(PotionStage stage) { return config.getDouble("Experience.Alchemy.Potion_Stage_" + stage.toNumerical(), 10D); }
|
|
|
|
|
|
+ public double getPotionXP(PotionStage stage) { return config.getDouble("Experience_114.Alchemy.Potion_Stage_" + stage.toNumerical(), 10D); }
|
|
|
|
|
|
/* Archery */
|
|
/* Archery */
|
|
- public double getArcheryDistanceMultiplier() { return config.getDouble("Experience.Archery.Distance_Multiplier", 0.025); }
|
|
|
|
|
|
+ public double getArcheryDistanceMultiplier() { return config.getDouble("Experience_114.Archery.Distance_Multiplier", 0.025); }
|
|
|
|
|
|
- public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
|
|
|
|
|
+ public int getFishingShakeXP() { return config.getInt("Experience_114.Fishing.Shake", 50); }
|
|
|
|
|
|
/* Repair */
|
|
/* Repair */
|
|
- public double getRepairXPBase() { return config.getDouble("Experience.Repair.Base", 1000.0); }
|
|
|
|
- public double getRepairXP(MaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
|
|
|
|
|
+ public double getRepairXPBase() { return config.getDouble("Experience_114.Repair.Base", 1000.0); }
|
|
|
|
+ public double getRepairXP(MaterialType repairMaterialType) { return config.getDouble("Experience_114.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
|
|
|
|
|
/* Taming */
|
|
/* Taming */
|
|
public int getTamingXP(EntityType type)
|
|
public int getTamingXP(EntityType type)
|
|
{
|
|
{
|
|
- return config.getInt("Experience.Taming.Animal_Taming." + StringUtils.getPrettyEntityTypeString(type));
|
|
|
|
|
|
+ return config.getInt("Experience_114.Taming.Animal_Taming." + StringUtils.getPrettyEntityTypeString(type));
|
|
}
|
|
}
|
|
}
|
|
}
|