mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 21:24:43 +02:00
Most Experience related maps are now tracked via a new ExperienceMapManager to simplify loading/unloading of registered values
This commit is contained in:
@ -12,6 +12,7 @@ import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||
import com.gmail.nossr50.skills.repair.repairables.SimpleRepairableManager;
|
||||
import com.gmail.nossr50.skills.salvage.salvageables.Salvageable;
|
||||
import com.gmail.nossr50.skills.salvage.salvageables.SimpleSalvageableManager;
|
||||
import com.gmail.nossr50.util.experience.ExperienceMapManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@ -50,6 +51,10 @@ public final class ConfigManager {
|
||||
|
||||
//TODO: Add these back when modded servers become a thing again
|
||||
|
||||
/* MISC MANAGERS */
|
||||
|
||||
private ExperienceMapManager experienceMapManager;
|
||||
|
||||
//private ModManager modManager;
|
||||
|
||||
/*private ToolConfigManager toolConfigManager;
|
||||
@ -127,10 +132,23 @@ public final class ConfigManager {
|
||||
// Multi Config Containers
|
||||
initMultiConfigContainers();
|
||||
|
||||
/*
|
||||
* Managers
|
||||
*/
|
||||
|
||||
// Register Managers
|
||||
initMiscManagers();
|
||||
initCollectionManagers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Misc managers
|
||||
*/
|
||||
private void initMiscManagers()
|
||||
{
|
||||
experienceMapManager = new ExperienceMapManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all of our Multi Config Containers
|
||||
*/
|
||||
@ -277,4 +295,8 @@ public final class ConfigManager {
|
||||
public ItemWeightConfig getItemWeightConfig() {
|
||||
return itemWeightConfig;
|
||||
}
|
||||
|
||||
public ExperienceMapManager getExperienceMapManager() {
|
||||
return experienceMapManager;
|
||||
}
|
||||
}
|
||||
|
@ -349,21 +349,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
return getIntValue(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a block gives XP
|
||||
* This is used to determine whether or not mcMMO should track a block that is placed by a user, among other things.
|
||||
* Note: If the block has an entry in the config that will return true even if the XP is 0, this does not check the value of the XP
|
||||
* @param skill The skill to check for
|
||||
* @param blockType the type of block
|
||||
* @return true if the block does give XP
|
||||
*/
|
||||
public boolean doesBlockGiveSkillXP(PrimarySkillType skill, Material blockType) {
|
||||
//TODO: This used to support wildcard characters, seems a bit unnecessary to do so.
|
||||
//TODO: This is going to need to be changed, this code here is only placeholder
|
||||
String[] path = new String[] {EXPERIENCE, StringUtils.getCapitalized(skill.toString()), blockType.toString()};
|
||||
return hasNode(path);
|
||||
}
|
||||
|
||||
/*
|
||||
* Experience Bar Stuff
|
||||
*/
|
||||
|
Reference in New Issue
Block a user