mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-03 04:55:28 +02:00
Enforce locale usage for enums to ensure correct casing (Fixes #4086)
This commit is contained in:
@@ -5,6 +5,7 @@ import com.gmail.nossr50.util.StringUtils;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ItemWeightConfig extends ConfigLoader {
|
||||
private static ItemWeightConfig instance;
|
||||
@@ -29,7 +30,7 @@ public class ItemWeightConfig extends ConfigLoader {
|
||||
HashSet<Material> miscItems = new HashSet<Material>();
|
||||
|
||||
for (String item : config.getStringList("Party_Shareables.Misc_Items")) {
|
||||
Material material = Material.getMaterial(item.toUpperCase());
|
||||
Material material = Material.getMaterial(item.toUpperCase(Locale.ENGLISH));
|
||||
|
||||
if (material != null) {
|
||||
miscItems.add(material);
|
||||
|
Reference in New Issue
Block a user