Update openMaterialSelector to exclude non-item materials in UtilGui.

Signed-off-by: Chaoscaot <max@maxsp.de>
This commit is contained in:
2025-11-11 17:20:10 +01:00
parent f56fedefe4
commit 93d0011b46
@@ -40,7 +40,7 @@ public class UtilGui {
public static void openMaterialSelector(Player player, String title, Consumer<Material> callback) {
List<SWListInv.SWListEntry<Material>> materials = new LinkedList<>();
for(Material material : Material.values()){
if(material.name().startsWith(Material.LEGACY_PREFIX))
if(material.name().startsWith(Material.LEGACY_PREFIX) || !material.isItem())
continue;
SWItem item = new SWItem(material, "§7" + material.name());
if(item.getItemMeta() != null && material.isItem()) {