Added unlockedItems in ClassDataContainer.

This commit is contained in:
Ka0rX 2023-03-21 20:58:14 +01:00
parent e518cafc85
commit bbab36ca1b
3 changed files with 19 additions and 4 deletions

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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<>();