9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-28 03:19:15 +00:00

feat: only show wardrobes player has access to

This commit is contained in:
LoJoSho
2023-05-24 14:38:01 -05:00
parent 128a33a21f
commit 70b97667c3

View File

@@ -75,7 +75,11 @@ public class CosmeticCommandTabComplete implements TabCompleter {
}
case "wardrobe" -> {
for (Wardrobe wardrobe : WardrobeSettings.getWardrobes()) {
completions.add(wardrobe.getId());
if (wardrobe.hasPermission()) {
if (user.getPlayer().hasPermission(wardrobe.getPermission())) completions.add(wardrobe.getId());
} else {
completions.add(wardrobe.getId());
}
}
}
case "dye" -> {