Skip to content

Commit

Permalink
Fix RankConfig not using the new updating config system
Browse files Browse the repository at this point in the history
  • Loading branch information
nossr50 committed Apr 17, 2023
1 parent 640f4b0 commit f40f68b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/gmail/nossr50/config/RankConfig.java
Expand Up @@ -9,7 +9,7 @@
import java.util.HashSet;
import java.util.List;

public class RankConfig extends AutoUpdateConfigLoader {
public class RankConfig extends BukkitConfig {
private static RankConfig instance;

public RankConfig() {
Expand Down Expand Up @@ -66,7 +66,7 @@ public int getSubSkillUnlockLevel(SubSkillType subSkillType, int rank) {
*/
public int getSubSkillUnlockLevel(SubSkillType subSkillType, int rank, boolean retroMode) {
String key = getRankAddressKey(subSkillType, rank, retroMode);
return config.getInt(key, getInternalConfig().getInt(key));
return config.getInt(key, defaultYamlConfig.getInt(key));
}

/**
Expand Down Expand Up @@ -128,7 +128,7 @@ public String getRankAddressKey(AbstractSubSkill subSkillType, int rank, boolean

private void resetRankValue(@NotNull SubSkillType subSkillType, int rank, boolean retroMode) {
String key = getRankAddressKey(subSkillType, rank, retroMode);
int defaultValue = getInternalConfig().getInt(key);
int defaultValue = defaultYamlConfig.getInt(key);
config.set(key, defaultValue);
mcMMO.p.getLogger().info(key + " SET -> " + defaultValue);
}
Expand Down

0 comments on commit f40f68b

Please sign in to comment.