diff --git a/pom.xml b/pom.xml
index 320a870..6ca353c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,7 @@
${build.version}-SNAPSHOT
- 0.8.0
+ 0.9.0
-LOCAL
diff --git a/src/main/java/world/bentobox/challenges/panel/util/SelectBlocksGUI.java b/src/main/java/world/bentobox/challenges/panel/util/SelectBlocksGUI.java
index d7c6855..2a924e4 100644
--- a/src/main/java/world/bentobox/challenges/panel/util/SelectBlocksGUI.java
+++ b/src/main/java/world/bentobox/challenges/panel/util/SelectBlocksGUI.java
@@ -28,7 +28,36 @@ public class SelectBlocksGUI
public SelectBlocksGUI(User user, boolean singleSelect, BiConsumer> consumer)
{
- this(user, singleSelect, new HashSet<>(), consumer);
+ this.consumer = consumer;
+ this.user = user;
+ this.singleSelect = singleSelect;
+
+ // Current GUI cannot display air blocks. It crashes with null-pointer
+ Set excludedMaterial = new HashSet<>();
+
+ excludedMaterial.add(Material.AIR);
+ excludedMaterial.add(Material.CAVE_AIR);
+ excludedMaterial.add(Material.VOID_AIR);
+
+ // Piston head and moving piston is not necessary. useless.
+ excludedMaterial.add(Material.PISTON_HEAD);
+ excludedMaterial.add(Material.MOVING_PISTON);
+
+ // Barrier cannot be accessible to user.
+ excludedMaterial.add(Material.BARRIER);
+
+ this.elements = new ArrayList<>();
+ this.selectedMaterials = new HashSet<>();
+
+ for (Material material : Material.values())
+ {
+ if (!material.isLegacy() && !excludedMaterial.contains(material))
+ {
+ this.elements.add(material);
+ }
+ }
+
+ this.build(0);
}