diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java index 69896ae1..f50f8da7 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/SQLWrapperImpl.java @@ -30,6 +30,7 @@ import java.io.File; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; +import java.util.stream.Stream; public class SQLWrapperImpl implements SQLWrapper { @@ -45,9 +46,11 @@ public class SQLWrapperImpl implements SQLWrapper { @Override public List getMaterialWithGreaterBlastResistance(double maxBlastResistance) { - return Arrays.stream(Material.values()) - .filter(material -> !material.isLegacy()) - .filter(Material::isBlock) + Stream stream = Arrays.stream(Material.values()); + if (Core.getVersion() > 12) { + stream = stream.filter(material -> !material.isLegacy()); + } + return stream.filter(Material::isBlock) .filter(material -> material.getBlastResistance() > maxBlastResistance) .collect(Collectors.toList()); }