Fixes #4571: When not used for displaying localized text, specify Locale.ROOT for toLowerCase/toUpperCase to avoid issues with locale-specific non-ASCII lowercase conversions for ASCII uppercase characters (i.e. turkish lowercase i for uppercase I). (#4573)
This commit is contained in:
@@ -20,6 +20,8 @@ package appeng.server;
|
||||
|
||||
import static net.minecraft.command.Commands.literal;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
||||
@@ -46,7 +48,7 @@ public final class AECommand {
|
||||
|
||||
private void add(LiteralArgumentBuilder<net.minecraft.command.CommandSource> builder, Commands subCommand) {
|
||||
|
||||
LiteralArgumentBuilder<CommandSource> subCommandBuilder = literal(subCommand.name().toLowerCase())
|
||||
LiteralArgumentBuilder<CommandSource> subCommandBuilder = literal(subCommand.name().toLowerCase(Locale.ROOT))
|
||||
.requires(src -> src.hasPermissionLevel(subCommand.level));
|
||||
subCommand.command.addArguments(subCommandBuilder);
|
||||
subCommandBuilder.executes(ctx -> {
|
||||
|
||||
Reference in New Issue
Block a user