mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-27 10:59:14 +00:00
feat: add hasCosmeticInSlot for cosmetic
This commit is contained in:
@@ -156,6 +156,14 @@ public class CosmeticUser {
|
||||
return playerCosmetics.containsKey(slot);
|
||||
}
|
||||
|
||||
public boolean hasCosmeticInSlot(Cosmetic cosmetic) {
|
||||
if (getCosmetic(cosmetic.getSlot()) == null) return true;
|
||||
if (cosmetic.getId() == getCosmetic(cosmetic.getSlot()).getId()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Set<CosmeticSlot> getSlotsWithCosmetics() {
|
||||
return Set.copyOf(playerCosmetics.keySet());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user