Merge fixes.

This commit is contained in:
Ka0rX 2023-04-02 19:55:45 +01:00
parent 9e98cd0640
commit 7bd7dcc2d7
3 changed files with 18 additions and 9 deletions

View File

@ -10,6 +10,7 @@ import net.Indyuce.mmocore.skill.ClassSkill;
import net.Indyuce.mmocore.skill.RegisteredSkill;
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
import net.Indyuce.mmocore.skilltree.tree.SkillTree;
import org.bukkit.attribute.Attribute;
import org.bukkit.configuration.ConfigurationSection;
import java.util.*;
@ -218,6 +219,10 @@ public class SavedClassInformation {
return attributeLevels.getOrDefault(id, 0);
}
public Set<String> getUnlockedItems() {
return unlockedItems;
}
public void registerAttributeLevel(PlayerAttribute attribute, int level) {
registerAttributeLevel(attribute.getId(), level);
}

View File

@ -12,6 +12,7 @@ import net.Indyuce.mmocore.manager.data.PlayerDataManager;
import net.Indyuce.mmocore.skill.ClassSkill;
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
import org.apache.commons.lang.Validate;
import org.bukkit.attribute.Attribute;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.jetbrains.annotations.NotNull;

View File

@ -6,10 +6,7 @@ import net.Indyuce.mmocore.skill.ClassSkill;
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
import org.bukkit.configuration.ConfigurationSection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
public class DefaultPlayerData implements ClassDataContainer {
private final int level, classPoints, skillPoints, attributePoints, attrReallocPoints, skillReallocPoints, skillTreeReallocPoints;
@ -122,6 +119,11 @@ public class DefaultPlayerData implements ClassDataContainer {
return new HashMap<>();
}
@Override
public Set<String> getUnlockedItems() {
return new HashSet<>();
}
@Override
public Map<String, Integer> mapAttributeLevels() {
return new HashMap<>();
@ -132,6 +134,7 @@ public class DefaultPlayerData implements ClassDataContainer {
return new HashMap<>();
}
public void apply(PlayerData player) {
player.setLevel(level);
player.setClassPoints(classPoints);