treasure chests
Some checks failed
Build / build (push) Failing after 3s

This commit is contained in:
unurled 2024-04-09 22:00:16 +02:00
parent acc7f076e0
commit c3c82b4478
Signed by: unurled
GPG key ID: FDBC9CBE1F82423F
7 changed files with 285 additions and 96 deletions

View file

@ -38,6 +38,7 @@ public class SRPlayer {
private Map<Attribute, Map<ItemStack, Double>> itemAttributes = new EnumMap<>(Attribute.class);
@Expose private List<PotionEffect> potionEffects = new ArrayList<>();
@Expose private Inventory inventory = null;
@Expose private List<Integer> treasuresOpened = new ArrayList<>();
public SRPlayer(@NotNull UUID uuid) {
this.uuid = uuid;
@ -259,4 +260,16 @@ public class SRPlayer {
}
this.experience = experience;
}
public List<Integer> getTreasuresOpened() {
return treasuresOpened;
}
public boolean hasOpenedTreasure(int id) {
return treasuresOpened.contains(id);
}
public void addTreasureOpened(int id) {
treasuresOpened.add(id);
}
}