mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-01 06:36:23 +02:00
fix other places where locale might matter
This commit is contained in:
parent
ce7461f459
commit
27a232d03e
@ -44,7 +44,7 @@ public class SalvageConfig extends BukkitConfig {
|
|||||||
if (mcMMO.getUpgradeManager().shouldUpgrade(UpgradeType.FIX_NETHERITE_SALVAGE_QUANTITIES)) {
|
if (mcMMO.getUpgradeManager().shouldUpgrade(UpgradeType.FIX_NETHERITE_SALVAGE_QUANTITIES)) {
|
||||||
mcMMO.p.getLogger().log(Level.INFO, "Fixing incorrect Salvage quantities on Netherite gear, this will only run once...");
|
mcMMO.p.getLogger().log(Level.INFO, "Fixing incorrect Salvage quantities on Netherite gear, this will only run once...");
|
||||||
for (String namespacedkey : mcMMO.getMaterialMapStore().getNetheriteArmor()) {
|
for (String namespacedkey : mcMMO.getMaterialMapStore().getNetheriteArmor()) {
|
||||||
config.set("Salvageables." + namespacedkey.toUpperCase() + ".MaximumQuantity", 4); //TODO: Doesn't make sense to default to 4 for everything
|
config.set("Salvageables." + namespacedkey.toUpperCase(Locale.ENGLISH) + ".MaximumQuantity", 4); //TODO: Doesn't make sense to default to 4 for everything
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -30,6 +30,7 @@ import java.lang.reflect.Method;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
@ -111,12 +112,12 @@ public final class ItemUtils {
|
|||||||
|
|
||||||
// try to match to Material ENUM
|
// try to match to Material ENUM
|
||||||
if (material == null) {
|
if (material == null) {
|
||||||
material = Material.getMaterial(materialName.toUpperCase());
|
material = Material.getMaterial(materialName.toUpperCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to match to Material ENUM with legacy name
|
// try to match to Material ENUM with legacy name
|
||||||
if (material == null) {
|
if (material == null) {
|
||||||
material = Material.getMaterial(materialName.toUpperCase(), true);
|
material = Material.getMaterial(materialName.toUpperCase(Locale.ENGLISH), true);
|
||||||
}
|
}
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user