Skip to content

Commit

Permalink
Fix ExprDyed
Browse files Browse the repository at this point in the history
  • Loading branch information
AyhamAl-Ali committed Apr 8, 2024
1 parent b382d48 commit fbd6b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/ch/njol/skript/expressions/ExprDyed.java
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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) {}
}
Expand Down

0 comments on commit fbd6b62

Please sign in to comment.