mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
use Locale.ROOT for uppercase as well
This commit is contained in:
@ -859,7 +859,7 @@ public final class BlockTypes {
|
||||
// Get the enum name (remove namespace if minecraft:)
|
||||
int propStart = id.indexOf('[');
|
||||
String typeName = id.substring(0, propStart == -1 ? id.length() : propStart);
|
||||
String enumName = (typeName.startsWith("minecraft:") ? typeName.substring(10) : typeName).toUpperCase();
|
||||
String enumName = (typeName.startsWith("minecraft:") ? typeName.substring(10) : typeName).toUpperCase(Locale.ROOT);
|
||||
BlockType existing = new BlockType(id, internalId, states);
|
||||
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.world.entity;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Locale;
|
||||
|
||||
public class EntityTypes {
|
||||
|
||||
@ -162,7 +163,7 @@ public class EntityTypes {
|
||||
}
|
||||
return parse(result.toString());
|
||||
}
|
||||
switch (id.toLowerCase()) {
|
||||
switch (id.toLowerCase(Locale.ROOT)) {
|
||||
case "xp_orb":
|
||||
return EntityTypes.EXPERIENCE_ORB;
|
||||
case "xp_bottle":
|
||||
|
@ -24,6 +24,7 @@ import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class ItemTypes {
|
||||
|
||||
@ -823,7 +824,7 @@ public final class ItemTypes {
|
||||
|
||||
@Nullable
|
||||
public static ItemType parse(String input) {
|
||||
input = input.toLowerCase();
|
||||
input = input.toLowerCase(Locale.ROOT);
|
||||
if (!Character.isAlphabetic(input.charAt(0))) {
|
||||
try {
|
||||
ItemType legacy = LegacyMapper.getInstance().getItemFromLegacy(input);
|
||||
|
Reference in New Issue
Block a user