From cd652078059ca1e0509971e9102b1dd31be956fe Mon Sep 17 00:00:00 2001 From: XPYEX <50171612+0XPYEX0@users.noreply.github.com> Date: Wed, 2 Oct 2024 06:29:40 +0800 Subject: [PATCH] Remove redundant material namespace check (#7121) --- src/main/java/ch/njol/skript/bukkitutil/BukkitUnsafe.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/ch/njol/skript/bukkitutil/BukkitUnsafe.java b/src/main/java/ch/njol/skript/bukkitutil/BukkitUnsafe.java index 5a2912039fb..f47a3f5d8d7 100644 --- a/src/main/java/ch/njol/skript/bukkitutil/BukkitUnsafe.java +++ b/src/main/java/ch/njol/skript/bukkitutil/BukkitUnsafe.java @@ -70,11 +70,7 @@ public class BukkitUnsafe { @Nullable public static Material getMaterialFromMinecraftId(String id) { - // On 1.13, Vanilla and Spigot names are same - if (id.length() > 9) - return Material.matchMaterial(id.substring(10)); // Strip 'minecraft:' out - else // Malformed material name - return null; + return Material.matchMaterial(id); } public static void modifyItemStack(ItemStack stack, String arguments) {