mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Added unlockedItems in ClassDataContainer.
This commit is contained in:
parent
e518cafc85
commit
bbab36ca1b
@ -374,6 +374,16 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getUnlockedItems() {
|
||||
return new HashSet<>(unlockedItems);
|
||||
}
|
||||
|
||||
public void setUnlockedItems(Set<String> unlockedItems) {
|
||||
this.unlockedItems.clear();
|
||||
this.unlockedItems.addAll(unlockedItems);
|
||||
}
|
||||
|
||||
public void resetTimesClaimed() {
|
||||
tableItemClaims.clear();
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* All the class-specific information i.e information being saved
|
||||
@ -48,4 +49,6 @@ public interface ClassDataContainer {
|
||||
Map<SkillTreeNode, Integer> getNodeLevels();
|
||||
|
||||
Map<String, Integer> getNodeTimesClaimed();
|
||||
|
||||
Set<String> getUnlockedItems();
|
||||
}
|
||||
|
@ -6,10 +6,7 @@ import net.Indyuce.mmocore.skilltree.SkillTreeNode;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
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<>();
|
||||
|
Loading…
Reference in New Issue
Block a user