forked from SteamWar/SteamWar
Update openMaterialSelector to exclude non-item materials in UtilGui.
Signed-off-by: Chaoscaot <max@maxsp.de>
This commit is contained in:
@@ -40,7 +40,7 @@ public class UtilGui {
|
|||||||
public static void openMaterialSelector(Player player, String title, Consumer<Material> callback) {
|
public static void openMaterialSelector(Player player, String title, Consumer<Material> callback) {
|
||||||
List<SWListInv.SWListEntry<Material>> materials = new LinkedList<>();
|
List<SWListInv.SWListEntry<Material>> materials = new LinkedList<>();
|
||||||
for(Material material : Material.values()){
|
for(Material material : Material.values()){
|
||||||
if(material.name().startsWith(Material.LEGACY_PREFIX))
|
if(material.name().startsWith(Material.LEGACY_PREFIX) || !material.isItem())
|
||||||
continue;
|
continue;
|
||||||
SWItem item = new SWItem(material, "§7" + material.name());
|
SWItem item = new SWItem(material, "§7" + material.name());
|
||||||
if(item.getItemMeta() != null && material.isItem()) {
|
if(item.getItemMeta() != null && material.isItem()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user