From a6339f06fc3eb35fe0d14286d4d9e9cbd3272585 Mon Sep 17 00:00:00 2001 From: Zak Shearman <34372536+ZakShearman@users.noreply.github.com> Date: Sat, 28 Oct 2023 15:35:12 +0100 Subject: [PATCH] Ignore badges with air material in GUI --- .../dev/emortal/minestom/core/module/core/badge/BadgeGui.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/dev/emortal/minestom/core/module/core/badge/BadgeGui.java b/src/main/java/dev/emortal/minestom/core/module/core/badge/BadgeGui.java index d2ac82b..0ebb1b9 100644 --- a/src/main/java/dev/emortal/minestom/core/module/core/badge/BadgeGui.java +++ b/src/main/java/dev/emortal/minestom/core/module/core/badge/BadgeGui.java @@ -93,6 +93,7 @@ public BadgeGui(@NotNull BadgeService badgeService, @NotNull Player player) { private void drawInventory(@NotNull List allBadges, @NotNull Set ownedBadgeIds, @Nullable String activeBadgeId) { List badges = allBadges.stream() + .filter(badge -> !badge.getGuiItem().getMaterial().equals("minecraft:air")) .sorted(Comparator.comparingLong(Badge::getPriority)) .toList();