mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 12:35:27 +02:00
Wire up Alchemy XP config values
This commit is contained in:
@@ -160,14 +160,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
/*
|
||||
* XP SETTINGS
|
||||
*/
|
||||
|
||||
/* Alchemy */
|
||||
for (PotionStage potionStage : PotionStage.values()) {
|
||||
if (getPotionXP(potionStage) < 0) {
|
||||
reason.add(EXPERIENCE + "." + ALCHEMY + "." + POTION_STAGE + potionStage.toNumerical() + " should be at least 0!");
|
||||
}
|
||||
}
|
||||
|
||||
/* Archery */
|
||||
if (getArcheryDistanceMultiplier() < 0) {
|
||||
reason.add(EXPERIENCE + "." + ARCHERY + "." + DISTANCE + MULTIPLIER + " should be at least 0!");
|
||||
@@ -387,11 +379,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
return BarStyle.SOLID;
|
||||
}
|
||||
|
||||
/* Alchemy */
|
||||
public double getPotionXP(PotionStage stage) {
|
||||
return getDoubleValue(EXPERIENCE, ALCHEMY, POTION_STAGE + stage.toNumerical());
|
||||
}
|
||||
|
||||
/* Archery */
|
||||
public double getArcheryDistanceMultiplier() {
|
||||
return getDoubleValue(EXPERIENCE, ARCHERY, DISTANCE + MULTIPLIER);
|
||||
|
@@ -136,8 +136,8 @@ public class ConfigExperience {
|
||||
return experienceAlchemy.getStageFourPotionXP();
|
||||
}
|
||||
|
||||
public int getStageFivePotionXP() {
|
||||
return experienceAlchemy.getStageFivePotionXP();
|
||||
public int getPotionXPByStage(int potionStage) {
|
||||
return experienceAlchemy.getPotionXPByStage(potionStage);
|
||||
}
|
||||
|
||||
public boolean isPvpXPEnabled() {
|
||||
|
@@ -46,10 +46,27 @@ public class ConfigExperienceAlchemy {
|
||||
return alchemyXPMap.get("Stage-Four-Potion");
|
||||
}
|
||||
|
||||
public int getStageFivePotionXP()
|
||||
/*public int getStageFivePotionXP()
|
||||
{
|
||||
//This is purposely zero to prevent an exploit
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
public int getPotionXPByStage(int potionStage)
|
||||
{
|
||||
switch(potionStage)
|
||||
{
|
||||
case 1:
|
||||
return getStageOnePotionXP();
|
||||
case 2:
|
||||
return getStageTwoPotionXP();
|
||||
case 3:
|
||||
return getStageThreePotionXP();
|
||||
case 4:
|
||||
return getStageFourPotionXP();
|
||||
default:
|
||||
return 0; //Zero XP is intentional to prevent some infinite loop XP exploit
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user