mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Gloabl XP multiplier is now tracked by the ExperienceMapManager
Added method to grab original value to ExperienceMapManager Moved skill xp values/mults into their own section
This commit is contained in:
parent
7f64fe11b8
commit
d0259d73c5
@ -74,7 +74,7 @@ public final class ConfigManager {
|
|||||||
|
|
||||||
/* UNLOAD REGISTER */
|
/* UNLOAD REGISTER */
|
||||||
|
|
||||||
SkillPropertiesManager skillPropertiesManager;
|
private SkillPropertiesManager skillPropertiesManager;
|
||||||
private ArrayList<Unload> unloadables;
|
private ArrayList<Unload> unloadables;
|
||||||
|
|
||||||
/* COLLECTION MANAGERS */
|
/* COLLECTION MANAGERS */
|
||||||
|
@ -8,199 +8,181 @@ import java.util.HashMap;
|
|||||||
@ConfigSerializable
|
@ConfigSerializable
|
||||||
public class ConfigExperience {
|
public class ConfigExperience {
|
||||||
|
|
||||||
@Setting(value = "Acrobatics", comment = "XP Settings for Acrobatics")
|
private static final double GLOBAL_XP_MULT_DEFAULT = 1.0D;
|
||||||
private ConfigExperienceAcrobatics experienceAcrobatics = new ConfigExperienceAcrobatics();
|
|
||||||
|
|
||||||
@Setting(value = "Alchemy", comment = "XP Settings for Alchemy")
|
@Setting(value = "Global-XP-Multiplier", comment = "This multiplier is applied at the very end of every XP gain, you can use it as a shortcut to increase or decrease xp gains across the entire plugin" +
|
||||||
private ConfigExperienceAlchemy experienceAlchemy = new ConfigExperienceAlchemy();
|
"\nThis value is temporarily overridden by xprate events." +
|
||||||
|
"\nDefault value: " + GLOBAL_XP_MULT_DEFAULT)
|
||||||
|
private double globalXPMultiplier = GLOBAL_XP_MULT_DEFAULT;
|
||||||
|
|
||||||
@Setting(value = "Archery", comment = "XP Settings for Archery")
|
@Setting(value = "Skill-XP-Settings", comment = "XP values and multipliers for each skill")
|
||||||
private ConfigExperienceArchery experienceArchery = new ConfigExperienceArchery();
|
private ConfigExperienceSkills configExperienceSkills = new ConfigExperienceSkills();
|
||||||
|
|
||||||
@Setting(value = "Fishing", comment = "XP Settings for Fishing")
|
|
||||||
private ConfigExperienceFishing experienceFishing = new ConfigExperienceFishing();
|
|
||||||
|
|
||||||
@Setting(value = "Excavation", comment = "XP Settings for Excavation")
|
|
||||||
private ConfigExperienceExcavation experienceExcavation = new ConfigExperienceExcavation();
|
|
||||||
|
|
||||||
@Setting(value = "Woodcutting", comment = "XP Settings for Woodcutting")
|
|
||||||
private ConfigExperienceWoodcutting experienceWoodcutting = new ConfigExperienceWoodcutting();
|
|
||||||
|
|
||||||
@Setting(value = "Herbalism", comment = "XP Settings for Herbalism")
|
|
||||||
private ConfigExperienceHerbalism experienceHerbalism = new ConfigExperienceHerbalism();
|
|
||||||
|
|
||||||
@Setting(value = "Mining", comment = "XP Settings for Mining")
|
|
||||||
private ConfigExperienceMining experienceMining = new ConfigExperienceMining();
|
|
||||||
|
|
||||||
@Setting(value = "Repair", comment = "XP Settings for Repair")
|
|
||||||
private ConfigExperienceRepair experienceRepair = new ConfigExperienceRepair();
|
|
||||||
|
|
||||||
@Setting(value = "Smelting", comment = "XP Settings for Smelting")
|
|
||||||
private ConfigExperienceSmelting experienceSmelting = new ConfigExperienceSmelting();
|
|
||||||
|
|
||||||
@Setting(value = "Taming", comment = "XP Settings for Taming")
|
|
||||||
private ConfigExperienceTaming experienceTaming = new ConfigExperienceTaming();
|
|
||||||
|
|
||||||
@Setting(value = "Z-Combat", comment = "XP Settings for Combat")
|
|
||||||
private ConfigExperienceCombat experienceCombat = new ConfigExperienceCombat();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BOILER PLATE GETTERS
|
* BOILER PLATE GETTERS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public ConfigExperienceAcrobatics getExperienceAcrobatics() {
|
public ConfigExperienceAcrobatics getExperienceAcrobatics() {
|
||||||
return experienceAcrobatics;
|
return getConfigExperienceSkills().getExperienceAcrobatics();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceAlchemy getExperienceAlchemy() {
|
public ConfigExperienceAlchemy getExperienceAlchemy() {
|
||||||
return experienceAlchemy;
|
return getConfigExperienceSkills().getExperienceAlchemy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceArchery getExperienceArchery() {
|
public ConfigExperienceArchery getExperienceArchery() {
|
||||||
return experienceArchery;
|
return getConfigExperienceSkills().getExperienceArchery();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceFishing getExperienceFishing() {
|
public ConfigExperienceFishing getExperienceFishing() {
|
||||||
return experienceFishing;
|
return getConfigExperienceSkills().getExperienceFishing();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceExcavation getExperienceExcavation() {
|
public ConfigExperienceExcavation getExperienceExcavation() {
|
||||||
return experienceExcavation;
|
return getConfigExperienceSkills().getExperienceExcavation();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceWoodcutting getExperienceWoodcutting() {
|
public ConfigExperienceWoodcutting getExperienceWoodcutting() {
|
||||||
return experienceWoodcutting;
|
return getConfigExperienceSkills().getExperienceWoodcutting();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceHerbalism getExperienceHerbalism() {
|
public ConfigExperienceHerbalism getExperienceHerbalism() {
|
||||||
return experienceHerbalism;
|
return getConfigExperienceSkills().getExperienceHerbalism();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceMining getExperienceMining() {
|
public ConfigExperienceMining getExperienceMining() {
|
||||||
return experienceMining;
|
return getConfigExperienceSkills().getExperienceMining();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceRepair getExperienceRepair() {
|
public ConfigExperienceRepair getExperienceRepair() {
|
||||||
return experienceRepair;
|
return getConfigExperienceSkills().getExperienceRepair();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceSmelting getExperienceSmelting() {
|
public ConfigExperienceSmelting getExperienceSmelting() {
|
||||||
return experienceSmelting;
|
return getConfigExperienceSkills().getExperienceSmelting();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceTaming getExperienceTaming() {
|
public ConfigExperienceTaming getExperienceTaming() {
|
||||||
return experienceTaming;
|
return getConfigExperienceSkills().getExperienceTaming();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigExperienceCombat getExperienceCombat() {
|
public ConfigExperienceCombat getExperienceCombat() {
|
||||||
return experienceCombat;
|
return getConfigExperienceSkills().getExperienceCombat();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getTamingExperienceMap() {
|
public HashMap<String, Integer> getTamingExperienceMap() {
|
||||||
return experienceTaming.getTamingExperienceMap();
|
return getConfigExperienceSkills().getTamingExperienceMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getMiningExperienceMap() {
|
public HashMap<String, Integer> getMiningExperienceMap() {
|
||||||
return experienceMining.getMiningExperienceMap();
|
return getConfigExperienceSkills().getMiningExperienceMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getSmeltingExperienceMap() {
|
public HashMap<String, Integer> getSmeltingExperienceMap() {
|
||||||
return experienceSmelting.getSmeltingExperienceMap();
|
return getConfigExperienceSkills().getSmeltingExperienceMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Double> getItemMaterialXPMultiplier() {
|
public HashMap<String, Double> getItemMaterialXPMultiplier() {
|
||||||
return experienceRepair.getItemMaterialXPMultiplier();
|
return getConfigExperienceSkills().getItemMaterialXPMultiplier();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getRepairXPBase() {
|
public double getRepairXPBase() {
|
||||||
return experienceRepair.getRepairXPBase();
|
return getConfigExperienceSkills().getRepairXPBase();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getAcrobaticsXPMap() {
|
public HashMap<String, Integer> getAcrobaticsXPMap() {
|
||||||
return experienceAcrobatics.getAcrobaticsXPMap();
|
return getConfigExperienceSkills().getAcrobaticsXPMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getFeatherFallMultiplier() {
|
public Double getFeatherFallMultiplier() {
|
||||||
return experienceAcrobatics.getFeatherFallMultiplier();
|
return getConfigExperienceSkills().getFeatherFallMultiplier();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getAlchemyXPMap() {
|
public HashMap<String, Integer> getAlchemyXPMap() {
|
||||||
return experienceAlchemy.getAlchemyXPMap();
|
return getConfigExperienceSkills().getAlchemyXPMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDodgeXP() {
|
public int getDodgeXP() {
|
||||||
return experienceAcrobatics.getDodgeXP();
|
return getConfigExperienceSkills().getDodgeXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRollXP() {
|
public int getRollXP() {
|
||||||
return experienceAcrobatics.getRollXP();
|
return getConfigExperienceSkills().getRollXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFallXP() {
|
public int getFallXP() {
|
||||||
return experienceAcrobatics.getFallXP();
|
return getConfigExperienceSkills().getFallXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStageOnePotionXP() {
|
public int getStageOnePotionXP() {
|
||||||
return experienceAlchemy.getStageOnePotionXP();
|
return getConfigExperienceSkills().getStageOnePotionXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStageTwoPotionXP() {
|
public int getStageTwoPotionXP() {
|
||||||
return experienceAlchemy.getStageTwoPotionXP();
|
return getConfigExperienceSkills().getStageTwoPotionXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStageThreePotionXP() {
|
public int getStageThreePotionXP() {
|
||||||
return experienceAlchemy.getStageThreePotionXP();
|
return getConfigExperienceSkills().getStageThreePotionXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStageFourPotionXP() {
|
public int getStageFourPotionXP() {
|
||||||
return experienceAlchemy.getStageFourPotionXP();
|
return getConfigExperienceSkills().getStageFourPotionXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPotionXPByStage(int potionStage) {
|
public int getPotionXPByStage(int potionStage) {
|
||||||
return experienceAlchemy.getPotionXPByStage(potionStage);
|
return getConfigExperienceSkills().getPotionXPByStage(potionStage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPvpXPEnabled() {
|
public boolean isPvpXPEnabled() {
|
||||||
return experienceCombat.isPvpXPEnabled();
|
return getConfigExperienceSkills().isPvpXPEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Double> getCombatExperienceMap() {
|
public HashMap<String, Double> getCombatExperienceMap() {
|
||||||
return experienceCombat.getCombatExperienceMap();
|
return getConfigExperienceSkills().getCombatExperienceMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDistanceMultiplier() {
|
public double getDistanceMultiplier() {
|
||||||
return experienceArchery.getDistanceMultiplier();
|
return getConfigExperienceSkills().getDistanceMultiplier();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getHerbalismXPMap() {
|
public HashMap<String, Integer> getHerbalismXPMap() {
|
||||||
return experienceHerbalism.getHerbalismXPMap();
|
return getConfigExperienceSkills().getHerbalismXPMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getWoodcuttingExperienceMap() {
|
public HashMap<String, Integer> getWoodcuttingExperienceMap() {
|
||||||
return experienceWoodcutting.getWoodcuttingExperienceMap();
|
return getConfigExperienceSkills().getWoodcuttingExperienceMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getExcavationExperienceMap() {
|
public HashMap<String, Integer> getExcavationExperienceMap() {
|
||||||
return experienceExcavation.getExcavationExperienceMap();
|
return getConfigExperienceSkills().getExcavationExperienceMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getFishingXPMap() {
|
public HashMap<String, Integer> getFishingXPMap() {
|
||||||
return experienceFishing.getFishingXPMap();
|
return getConfigExperienceSkills().getFishingXPMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getShakeXP() {
|
public int getShakeXP() {
|
||||||
return experienceFishing.getShakeXP();
|
return getConfigExperienceSkills().getShakeXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getMobSpawnerXPMult() {
|
public double getSpawnedMobXPMult() {
|
||||||
return experienceCombat.getMobSpawnerXPMult();
|
return getConfigExperienceSkills().getSpawnedMobXPMult();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getPVPXPMult() {
|
public double getPVPXPMult() {
|
||||||
return experienceCombat.getPVPXPMult();
|
return getConfigExperienceSkills().getPVPXPMult();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getAnimalsXPMult() {
|
public double getAnimalsXPMult() {
|
||||||
return experienceCombat.getAnimalsXPMult();
|
return getConfigExperienceSkills().getAnimalsXPMult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceSkills getConfigExperienceSkills() {
|
||||||
|
return configExperienceSkills;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getGlobalXPMultiplier() {
|
||||||
|
return globalXPMultiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -77,8 +77,9 @@ public class ConfigExperienceCombat {
|
|||||||
//SPECIAL
|
//SPECIAL
|
||||||
SPECIAL_COMBAT_EXPERIENCE_DEFAULT = new HashMap<>();
|
SPECIAL_COMBAT_EXPERIENCE_DEFAULT = new HashMap<>();
|
||||||
SPECIAL_COMBAT_EXPERIENCE_DEFAULT.put("animals", 1.0D); //TODO: this seems like a dumb config option
|
SPECIAL_COMBAT_EXPERIENCE_DEFAULT.put("animals", 1.0D); //TODO: this seems like a dumb config option
|
||||||
SPECIAL_COMBAT_EXPERIENCE_DEFAULT.put("mobspawners", 0.0D);
|
SPECIAL_COMBAT_EXPERIENCE_DEFAULT.put("spawned", 0.0D);
|
||||||
SPECIAL_COMBAT_EXPERIENCE_DEFAULT.put("pvp", 1.0D);
|
SPECIAL_COMBAT_EXPERIENCE_DEFAULT.put("pvp", 1.0D);
|
||||||
|
SPECIAL_COMBAT_EXPERIENCE_DEFAULT.put("player-bred-mobs", 1.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Setting(value = "Combat-XP-Multipliers")
|
@Setting(value = "Combat-XP-Multipliers")
|
||||||
@ -100,7 +101,7 @@ public class ConfigExperienceCombat {
|
|||||||
return combatExperienceMap;
|
return combatExperienceMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getMobSpawnerXPMult() {
|
public double getSpawnedMobXPMult() {
|
||||||
return specialCombatExperienceMap.get("mobspawners");
|
return specialCombatExperienceMap.get("mobspawners");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,205 @@
|
|||||||
|
package com.gmail.nossr50.config.hocon.experience;
|
||||||
|
|
||||||
|
import ninja.leaping.configurate.objectmapping.Setting;
|
||||||
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@ConfigSerializable
|
||||||
|
public class ConfigExperienceSkills {
|
||||||
|
@Setting(value = "Acrobatics", comment = "XP Settings for Acrobatics")
|
||||||
|
private ConfigExperienceAcrobatics experienceAcrobatics = new ConfigExperienceAcrobatics();
|
||||||
|
|
||||||
|
@Setting(value = "Alchemy", comment = "XP Settings for Alchemy")
|
||||||
|
private ConfigExperienceAlchemy experienceAlchemy = new ConfigExperienceAlchemy();
|
||||||
|
|
||||||
|
@Setting(value = "Archery", comment = "XP Settings for Archery")
|
||||||
|
private ConfigExperienceArchery experienceArchery = new ConfigExperienceArchery();
|
||||||
|
|
||||||
|
@Setting(value = "Fishing", comment = "XP Settings for Fishing")
|
||||||
|
private ConfigExperienceFishing experienceFishing = new ConfigExperienceFishing();
|
||||||
|
|
||||||
|
@Setting(value = "Excavation", comment = "XP Settings for Excavation")
|
||||||
|
private ConfigExperienceExcavation experienceExcavation = new ConfigExperienceExcavation();
|
||||||
|
|
||||||
|
@Setting(value = "Woodcutting", comment = "XP Settings for Woodcutting")
|
||||||
|
private ConfigExperienceWoodcutting experienceWoodcutting = new ConfigExperienceWoodcutting();
|
||||||
|
|
||||||
|
@Setting(value = "Herbalism", comment = "XP Settings for Herbalism")
|
||||||
|
private ConfigExperienceHerbalism experienceHerbalism = new ConfigExperienceHerbalism();
|
||||||
|
|
||||||
|
@Setting(value = "Mining", comment = "XP Settings for Mining")
|
||||||
|
private ConfigExperienceMining experienceMining = new ConfigExperienceMining();
|
||||||
|
|
||||||
|
@Setting(value = "Repair", comment = "XP Settings for Repair")
|
||||||
|
private ConfigExperienceRepair experienceRepair = new ConfigExperienceRepair();
|
||||||
|
|
||||||
|
@Setting(value = "Smelting", comment = "XP Settings for Smelting")
|
||||||
|
private ConfigExperienceSmelting experienceSmelting = new ConfigExperienceSmelting();
|
||||||
|
|
||||||
|
@Setting(value = "Taming", comment = "XP Settings for Taming")
|
||||||
|
private ConfigExperienceTaming experienceTaming = new ConfigExperienceTaming();
|
||||||
|
|
||||||
|
@Setting(value = "Z-Combat", comment = "XP Settings for Combat")
|
||||||
|
private ConfigExperienceCombat experienceCombat = new ConfigExperienceCombat();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BOILER PLATE GETTERS
|
||||||
|
*/
|
||||||
|
|
||||||
|
public ConfigExperienceAcrobatics getExperienceAcrobatics() {
|
||||||
|
return experienceAcrobatics;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceAlchemy getExperienceAlchemy() {
|
||||||
|
return experienceAlchemy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceArchery getExperienceArchery() {
|
||||||
|
return experienceArchery;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceFishing getExperienceFishing() {
|
||||||
|
return experienceFishing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceExcavation getExperienceExcavation() {
|
||||||
|
return experienceExcavation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceWoodcutting getExperienceWoodcutting() {
|
||||||
|
return experienceWoodcutting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceHerbalism getExperienceHerbalism() {
|
||||||
|
return experienceHerbalism;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceMining getExperienceMining() {
|
||||||
|
return experienceMining;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceRepair getExperienceRepair() {
|
||||||
|
return experienceRepair;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceSmelting getExperienceSmelting() {
|
||||||
|
return experienceSmelting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceTaming getExperienceTaming() {
|
||||||
|
return experienceTaming;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigExperienceCombat getExperienceCombat() {
|
||||||
|
return experienceCombat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getTamingExperienceMap() {
|
||||||
|
return experienceTaming.getTamingExperienceMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getMiningExperienceMap() {
|
||||||
|
return experienceMining.getMiningExperienceMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getSmeltingExperienceMap() {
|
||||||
|
return experienceSmelting.getSmeltingExperienceMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Double> getItemMaterialXPMultiplier() {
|
||||||
|
return experienceRepair.getItemMaterialXPMultiplier();
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getRepairXPBase() {
|
||||||
|
return experienceRepair.getRepairXPBase();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getAcrobaticsXPMap() {
|
||||||
|
return experienceAcrobatics.getAcrobaticsXPMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getFeatherFallMultiplier() {
|
||||||
|
return experienceAcrobatics.getFeatherFallMultiplier();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getAlchemyXPMap() {
|
||||||
|
return experienceAlchemy.getAlchemyXPMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDodgeXP() {
|
||||||
|
return experienceAcrobatics.getDodgeXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRollXP() {
|
||||||
|
return experienceAcrobatics.getRollXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFallXP() {
|
||||||
|
return experienceAcrobatics.getFallXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStageOnePotionXP() {
|
||||||
|
return experienceAlchemy.getStageOnePotionXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStageTwoPotionXP() {
|
||||||
|
return experienceAlchemy.getStageTwoPotionXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStageThreePotionXP() {
|
||||||
|
return experienceAlchemy.getStageThreePotionXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStageFourPotionXP() {
|
||||||
|
return experienceAlchemy.getStageFourPotionXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPotionXPByStage(int potionStage) {
|
||||||
|
return experienceAlchemy.getPotionXPByStage(potionStage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPvpXPEnabled() {
|
||||||
|
return experienceCombat.isPvpXPEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Double> getCombatExperienceMap() {
|
||||||
|
return experienceCombat.getCombatExperienceMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getDistanceMultiplier() {
|
||||||
|
return experienceArchery.getDistanceMultiplier();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getHerbalismXPMap() {
|
||||||
|
return experienceHerbalism.getHerbalismXPMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getWoodcuttingExperienceMap() {
|
||||||
|
return experienceWoodcutting.getWoodcuttingExperienceMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getExcavationExperienceMap() {
|
||||||
|
return experienceExcavation.getExcavationExperienceMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Integer> getFishingXPMap() {
|
||||||
|
return experienceFishing.getFishingXPMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getShakeXP() {
|
||||||
|
return experienceFishing.getShakeXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getSpawnedMobXPMult() {
|
||||||
|
return experienceCombat.getSpawnedMobXPMult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getPVPXPMult() {
|
||||||
|
return experienceCombat.getPVPXPMult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAnimalsXPMult() {
|
||||||
|
return experienceCombat.getAnimalsXPMult();
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@ public class ActionBarNotificationSetting {
|
|||||||
|
|
||||||
public boolean enabled;
|
public boolean enabled;
|
||||||
public boolean sendCopyOfMessageToChat;
|
public boolean sendCopyOfMessageToChat;
|
||||||
|
|
||||||
public ActionBarNotificationSetting(boolean enabled, boolean sendCopyOfMessageToChat) {
|
public ActionBarNotificationSetting(boolean enabled, boolean sendCopyOfMessageToChat) {
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
this.sendCopyOfMessageToChat = sendCopyOfMessageToChat;
|
this.sendCopyOfMessageToChat = sendCopyOfMessageToChat;
|
||||||
|
@ -21,7 +21,9 @@ public class ConfigExperienceFormula {
|
|||||||
"\nEXPONENTIAL Formula: multiplier * level ^ exponent + base")
|
"\nEXPONENTIAL Formula: multiplier * level ^ exponent + base")
|
||||||
private ConfigExperienceFormulaExponential configExperienceFormulaExponential = new ConfigExperienceFormulaExponential();
|
private ConfigExperienceFormulaExponential configExperienceFormulaExponential = new ConfigExperienceFormulaExponential();
|
||||||
|
|
||||||
@Setting(value = "Use-Cumulative-XP-Curve", comment = "")
|
@Setting(value = "Use-Cumulative-XP-Curve", comment = "Replaces the value for level used in the XP formulas with a players power level." +
|
||||||
|
"\nEffectively this makes it much harder to level, especially on exponential curve." +
|
||||||
|
"\nDefault value: " + CUMULATIVE_CURVE_DEFAULT)
|
||||||
private boolean cumulativeCurveEnabled = CUMULATIVE_CURVE_DEFAULT;
|
private boolean cumulativeCurveEnabled = CUMULATIVE_CURVE_DEFAULT;
|
||||||
|
|
||||||
public FormulaType getFormulaType() {
|
public FormulaType getFormulaType() {
|
||||||
|
@ -98,35 +98,35 @@ public class ConfigLeveling {
|
|||||||
public int getLevelCap(PrimarySkillType primarySkillType) {
|
public int getLevelCap(PrimarySkillType primarySkillType) {
|
||||||
switch (primarySkillType) {
|
switch (primarySkillType) {
|
||||||
case ACROBATICS:
|
case ACROBATICS:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getAcrobatics().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getAcrobatics().getLevelCap();
|
||||||
case ALCHEMY:
|
case ALCHEMY:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getAlchemy().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getAlchemy().getLevelCap();
|
||||||
case ARCHERY:
|
case ARCHERY:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getArchery().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getArchery().getLevelCap();
|
||||||
case AXES:
|
case AXES:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getAxes().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getAxes().getLevelCap();
|
||||||
case EXCAVATION:
|
case EXCAVATION:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getExcavation().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getExcavation().getLevelCap();
|
||||||
case FISHING:
|
case FISHING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getFishing().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getFishing().getLevelCap();
|
||||||
case HERBALISM:
|
case HERBALISM:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getHerbalism().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getHerbalism().getLevelCap();
|
||||||
case MINING:
|
case MINING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getMining().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getMining().getLevelCap();
|
||||||
case REPAIR:
|
case REPAIR:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getRepair().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getRepair().getLevelCap();
|
||||||
case SWORDS:
|
case SWORDS:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getSwords().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSwords().getLevelCap();
|
||||||
case TAMING:
|
case TAMING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getTaming().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getTaming().getLevelCap();
|
||||||
case UNARMED:
|
case UNARMED:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getUnarmed().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getUnarmed().getLevelCap();
|
||||||
case WOODCUTTING:
|
case WOODCUTTING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getWoodcutting().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getWoodcutting().getLevelCap();
|
||||||
case SMELTING:
|
case SMELTING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getSmelting().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSmelting().getLevelCap();
|
||||||
case SALVAGE:
|
case SALVAGE:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getSalvage().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().getLevelCap();
|
||||||
default:
|
default:
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
@ -135,35 +135,35 @@ public class ConfigLeveling {
|
|||||||
public boolean isLevelCapEnabled(PrimarySkillType primarySkillType) {
|
public boolean isLevelCapEnabled(PrimarySkillType primarySkillType) {
|
||||||
switch (primarySkillType) {
|
switch (primarySkillType) {
|
||||||
case ACROBATICS:
|
case ACROBATICS:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getAcrobatics().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getAcrobatics().isLevelCapEnabled();
|
||||||
case ALCHEMY:
|
case ALCHEMY:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getAlchemy().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getAlchemy().isLevelCapEnabled();
|
||||||
case ARCHERY:
|
case ARCHERY:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getArchery().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getArchery().isLevelCapEnabled();
|
||||||
case AXES:
|
case AXES:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getAxes().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getAxes().isLevelCapEnabled();
|
||||||
case EXCAVATION:
|
case EXCAVATION:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getExcavation().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getExcavation().isLevelCapEnabled();
|
||||||
case FISHING:
|
case FISHING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getFishing().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getFishing().isLevelCapEnabled();
|
||||||
case HERBALISM:
|
case HERBALISM:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getHerbalism().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getHerbalism().isLevelCapEnabled();
|
||||||
case MINING:
|
case MINING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getMining().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getMining().isLevelCapEnabled();
|
||||||
case REPAIR:
|
case REPAIR:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getRepair().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getRepair().isLevelCapEnabled();
|
||||||
case SWORDS:
|
case SWORDS:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getSwords().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSwords().isLevelCapEnabled();
|
||||||
case TAMING:
|
case TAMING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getTaming().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getTaming().isLevelCapEnabled();
|
||||||
case UNARMED:
|
case UNARMED:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getUnarmed().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getUnarmed().isLevelCapEnabled();
|
||||||
case WOODCUTTING:
|
case WOODCUTTING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getWoodcutting().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getWoodcutting().isLevelCapEnabled();
|
||||||
case SMELTING:
|
case SMELTING:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getSmelting().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSmelting().isLevelCapEnabled();
|
||||||
case SALVAGE:
|
case SALVAGE:
|
||||||
return configSectionLevelCaps.getConfigSectionSkills().getSalvage().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().isLevelCapEnabled();
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ public class ConfigSectionLevelCaps {
|
|||||||
private ConfigSectionSkillLevelCap powerLevel = new ConfigSectionSkillLevelCap();
|
private ConfigSectionSkillLevelCap powerLevel = new ConfigSectionSkillLevelCap();
|
||||||
|
|
||||||
@Setting(value = "Skills", comment = "Per Skill cap settings")
|
@Setting(value = "Skills", comment = "Per Skill cap settings")
|
||||||
private ConfigSectionSkills configSectionSkills = new ConfigSectionSkills();
|
private ConfigSectionSkillLevelCaps configSectionSkillLevelCaps = new ConfigSectionSkillLevelCaps();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GETTER BOILERPLATE
|
* GETTER BOILERPLATE
|
||||||
@ -37,7 +37,7 @@ public class ConfigSectionLevelCaps {
|
|||||||
return truncateSkillsAboveCap;
|
return truncateSkillsAboveCap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigSectionSkills getConfigSectionSkills() {
|
public ConfigSectionSkillLevelCaps getConfigSectionSkillLevelCaps() {
|
||||||
return configSectionSkills;
|
return configSectionSkillLevelCaps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import ninja.leaping.configurate.objectmapping.Setting;
|
|||||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
@ConfigSerializable
|
@ConfigSerializable
|
||||||
public class ConfigSectionSkills {
|
public class ConfigSectionSkillLevelCaps {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CONFIG NODES
|
* CONFIG NODES
|
@ -10,10 +10,11 @@ import java.util.HashMap;
|
|||||||
* This class handles the XP for block break related XP
|
* This class handles the XP for block break related XP
|
||||||
*/
|
*/
|
||||||
public class ExperienceMapManager implements Unload {
|
public class ExperienceMapManager implements Unload {
|
||||||
public HashMap<Material, Integer> miningXpMap;
|
private HashMap<Material, Integer> miningXpMap;
|
||||||
public HashMap<Material, Integer> herbalismXpMap;
|
private HashMap<Material, Integer> herbalismXpMap;
|
||||||
public HashMap<Material, Integer> woodcuttingXpMap;
|
private HashMap<Material, Integer> woodcuttingXpMap;
|
||||||
public HashMap<Material, Integer> excavationXpMap;
|
private HashMap<Material, Integer> excavationXpMap;
|
||||||
|
private double globalXpMult;
|
||||||
|
|
||||||
public ExperienceMapManager() {
|
public ExperienceMapManager() {
|
||||||
miningXpMap = new HashMap<>();
|
miningXpMap = new HashMap<>();
|
||||||
@ -25,6 +26,33 @@ public class ExperienceMapManager implements Unload {
|
|||||||
mcMMO.getConfigManager().registerUnloadable(this);
|
mcMMO.getConfigManager().registerUnloadable(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the gloabl xp multiplier, this is temporary and will not be serialiized
|
||||||
|
* @param newValue new global xp multiplier value
|
||||||
|
*/
|
||||||
|
public void setGlobalXpMult(double newValue) {
|
||||||
|
globalXpMult = newValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the current global xp multiplier value
|
||||||
|
* This value can be changed by the xprate command
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public double getGlobalXpMult() {
|
||||||
|
return globalXpMult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the original value of the global XP multiplier
|
||||||
|
* This is defined by the users config
|
||||||
|
* This value can be different from the current working value (due to xprate etc)
|
||||||
|
* @return the original global xp multiplier value from the user config file
|
||||||
|
*/
|
||||||
|
public double getOriginalGlobalXpMult() {
|
||||||
|
return mcMMO.getConfigManager().getConfigExperience().getGlobalXPMultiplier();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether or not a block has Mining XP
|
* Determines whether or not a block has Mining XP
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user