From fbd6b62e5e75a4eda1c5e00b50d053c488564a8f Mon Sep 17 00:00:00 2001 From: Ayham Al-Ali <20037329+AyhamAl-Ali@users.noreply.github.com> Date: Mon, 8 Apr 2024 05:31:11 +0300 Subject: [PATCH] Fix ExprDyed --- src/main/java/ch/njol/skript/expressions/ExprDyed.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprDyed.java b/src/main/java/ch/njol/skript/expressions/ExprDyed.java index 3742faf26e5..7a2599e92b1 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprDyed.java +++ b/src/main/java/ch/njol/skript/expressions/ExprDyed.java @@ -38,6 +38,7 @@ import org.bukkit.inventory.meta.PotionMeta; import org.eclipse.jdt.annotation.Nullable; +import java.util.Locale; import java.util.regex.Matcher; @Name("Dyed") @@ -99,7 +100,7 @@ protected ItemType[] get(Event event) { if (!matcher.matches()) continue; try { - Material newItem = Material.valueOf(material.name().replace(matcher.group(1), color.getName())); + Material newItem = Material.valueOf(material.name().replace(matcher.group(1), color.getName().toUpperCase(Locale.ENGLISH))); item.setTo(new ItemType(newItem)); } catch (IllegalArgumentException ignored) {} }