diff --git a/src/main/java/ch/njol/skript/aliases/Aliases.java b/src/main/java/ch/njol/skript/aliases/Aliases.java
index 19daed69359..3e67971698a 100644
--- a/src/main/java/ch/njol/skript/aliases/Aliases.java
+++ b/src/main/java/ch/njol/skript/aliases/Aliases.java
@@ -395,17 +395,17 @@ public static void load() {
}
/**
- * Temporarily create an alias for a material which may not have an alias yet.
+ * Temporarily create an alias for materials which do not have aliases yet.
*/
private static void loadMissingAliases() {
if (!Skript.methodExists(Material.class, "getKey"))
return;
for (Material material : Material.values()) {
- if (!provider.hasAliasForMaterial(material)) {
+ if (!material.isLegacy() && !provider.hasAliasForMaterial(material)) {
NamespacedKey key = material.getKey();
String name = key.getKey().replace("_", " ");
parser.loadAlias(name + "¦s", key.toString());
- Skript.debug(ChatColor.YELLOW + "Creating temporary alias for: " + key.toString());
+ Skript.debug(ChatColor.YELLOW + "Creating temporary alias for: " + key);
}
}
}
diff --git a/src/main/java/ch/njol/skript/expressions/ExprItems.java b/src/main/java/ch/njol/skript/expressions/ExprItems.java
index 652cb3f6a72..4fb0c11d66a 100644
--- a/src/main/java/ch/njol/skript/expressions/ExprItems.java
+++ b/src/main/java/ch/njol/skript/expressions/ExprItems.java
@@ -1,21 +1,3 @@
-/**
- * This file is part of Skript.
- *
- * Skript is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Skript is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Skript. If not, see .
- *
- * Copyright Peter Güttinger, SkriptLang team and contributors
- */
package ch.njol.skript.expressions;
import ch.njol.skript.Skript;
@@ -54,7 +36,7 @@
public class ExprItems extends SimpleExpression {
private static final ItemType[] ALL_BLOCKS = Arrays.stream(Material.values())
- .filter(Material::isBlock)
+ .filter(material -> !material.isLegacy() && material.isBlock())
.map(ItemType::new)
.toArray(ItemType[]::new);