forked from Upstream/mmocore
Merge fixes.
This commit is contained in:
parent
9e98cd0640
commit
7bd7dcc2d7
@ -10,6 +10,7 @@ import net.Indyuce.mmocore.skill.ClassSkill;
|
|||||||
import net.Indyuce.mmocore.skill.RegisteredSkill;
|
import net.Indyuce.mmocore.skill.RegisteredSkill;
|
||||||
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
||||||
import net.Indyuce.mmocore.skilltree.tree.SkillTree;
|
import net.Indyuce.mmocore.skilltree.tree.SkillTree;
|
||||||
|
import org.bukkit.attribute.Attribute;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -218,6 +219,10 @@ public class SavedClassInformation {
|
|||||||
return attributeLevels.getOrDefault(id, 0);
|
return attributeLevels.getOrDefault(id, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<String> getUnlockedItems() {
|
||||||
|
return unlockedItems;
|
||||||
|
}
|
||||||
|
|
||||||
public void registerAttributeLevel(PlayerAttribute attribute, int level) {
|
public void registerAttributeLevel(PlayerAttribute attribute, int level) {
|
||||||
registerAttributeLevel(attribute.getId(), level);
|
registerAttributeLevel(attribute.getId(), level);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import net.Indyuce.mmocore.manager.data.PlayerDataManager;
|
|||||||
import net.Indyuce.mmocore.skill.ClassSkill;
|
import net.Indyuce.mmocore.skill.ClassSkill;
|
||||||
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
|
import org.bukkit.attribute.Attribute;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
@ -6,10 +6,7 @@ import net.Indyuce.mmocore.skill.ClassSkill;
|
|||||||
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class DefaultPlayerData implements ClassDataContainer {
|
public class DefaultPlayerData implements ClassDataContainer {
|
||||||
private final int level, classPoints, skillPoints, attributePoints, attrReallocPoints, skillReallocPoints, skillTreeReallocPoints;
|
private final int level, classPoints, skillPoints, attributePoints, attrReallocPoints, skillReallocPoints, skillTreeReallocPoints;
|
||||||
@ -24,10 +21,10 @@ public class DefaultPlayerData implements ClassDataContainer {
|
|||||||
attrReallocPoints = config.getInt("attribute-realloc-points");
|
attrReallocPoints = config.getInt("attribute-realloc-points");
|
||||||
skillReallocPoints = config.getInt("skill-realloc-points", 0);
|
skillReallocPoints = config.getInt("skill-realloc-points", 0);
|
||||||
skillTreeReallocPoints = config.getInt("skill-tree-realloc-points", 0);
|
skillTreeReallocPoints = config.getInt("skill-tree-realloc-points", 0);
|
||||||
health=config.getDouble("health",20);
|
health = config.getDouble("health", 20);
|
||||||
mana=config.getDouble("mana",20);
|
mana = config.getDouble("mana", 20);
|
||||||
stamina=config.getDouble("stamina",20);
|
stamina = config.getDouble("stamina", 20);
|
||||||
stellium=config.getDouble("stellium",20);
|
stellium = config.getDouble("stellium", 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DefaultPlayerData(int level, int classPoints, int skillPoints, int attributePoints, int attrReallocPoints, int skillReallocPoints, int skillTreeReallocPoints, double health, double mana, double stamina, double stellium) {
|
public DefaultPlayerData(int level, int classPoints, int skillPoints, int attributePoints, int attrReallocPoints, int skillReallocPoints, int skillTreeReallocPoints, double health, double mana, double stamina, double stellium) {
|
||||||
@ -122,16 +119,22 @@ public class DefaultPlayerData implements ClassDataContainer {
|
|||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<String> getUnlockedItems() {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Integer> mapAttributeLevels() {
|
public Map<String, Integer> mapAttributeLevels() {
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Integer,String> mapBoundSkills() {
|
public Map<Integer, String> mapBoundSkills() {
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void apply(PlayerData player) {
|
public void apply(PlayerData player) {
|
||||||
player.setLevel(level);
|
player.setLevel(level);
|
||||||
player.setClassPoints(classPoints);
|
player.setClassPoints(classPoints);
|
||||||
|
Loading…
Reference in New Issue
Block a user