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) {} }