This commit is contained in:
Ka0rX 2023-03-28 16:10:51 +01:00
parent 9facd8d3df
commit b62b0e89e9

View File

@ -371,18 +371,19 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
*/ */
@Override @Override
public Set<String> getMMOUnlockedItems() { public Set<String> getMMOUnlockedItems() {
return mmoData.getUnlockedItems().stream().filter(key->key.startsWith(MMOCORE_ITEM_ID)).collect(Collectors.toSet()); return mmoData.getUnlockedItems().stream().filter(key -> key.startsWith(MMOCORE_ITEM_ID)).collect(Collectors.toSet());
} }
/** /**
* Used to change the value of the unlockedItems handled by mmocore. * Used to change the value of the unlockedItems handled by mmocore.
*
* @param unlockedItems * @param unlockedItems
*/ */
public void setUnlockedItems(Set<String> unlockedItems) { public void setUnlockedItems(Set<String> unlockedItems) {
Set<String> mythicUnlockedItems=mmoData.getUnlockedItems() Set<String> mythicUnlockedItems = mmoData.getUnlockedItems()
.stream() .stream()
.filter((key)->!key.startsWith(MMOCORE_ITEM_ID)) .filter((key) -> !key.startsWith(MMOCORE_ITEM_ID))
.collect(Collectors.toSet()); .collect(Collectors.toSet());
mythicUnlockedItems.addAll(unlockedItems); mythicUnlockedItems.addAll(unlockedItems);
mmoData.setUnlockedItems(mythicUnlockedItems); mmoData.setUnlockedItems(mythicUnlockedItems);
@ -1133,7 +1134,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
profess.getSkills() profess.getSkills()
.stream() .stream()
.filter(ClassSkill::isUnlockedByDefault) .filter(ClassSkill::isUnlockedByDefault)
.forEach(skill->mmoData.unlock(skill.getSkill())); .forEach(skill -> mmoData.unlock(skill.getSkill()));
} }
public boolean hasSkillBound(int slot) { public boolean hasSkillBound(int slot) {