mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-27 17:45:28 +02:00
Further address locale issues (Targets #4083)
This commit is contained in:
@@ -28,6 +28,7 @@ import org.bukkit.command.PluginCommand;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class CommandRegistrationManager {
|
||||
private CommandRegistrationManager() {};
|
||||
@@ -36,8 +37,8 @@ public final class CommandRegistrationManager {
|
||||
|
||||
private static void registerSkillCommands() {
|
||||
for (PrimarySkillType skill : PrimarySkillType.values()) {
|
||||
String commandName = skill.toString().toLowerCase();
|
||||
String localizedName = skill.getName().toLowerCase();
|
||||
String commandName = skill.toString().toLowerCase(Locale.ENGLISH);
|
||||
String localizedName = skill.getName().toLowerCase(Locale.ENGLISH);
|
||||
|
||||
PluginCommand command;
|
||||
|
||||
|
@@ -17,6 +17,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class CommandUtils {
|
||||
public static final List<String> TRUE_FALSE_OPTIONS = ImmutableList.of("on", "off", "true", "false", "enabled", "disabled");
|
||||
@@ -302,7 +303,7 @@ public final class CommandUtils {
|
||||
break;
|
||||
}
|
||||
|
||||
if (playerName.toLowerCase().contains(partialName.toLowerCase())) {
|
||||
if (playerName.toLowerCase(Locale.ENGLISH).contains(partialName.toLowerCase(Locale.ENGLISH))) {
|
||||
// Partial match
|
||||
matchedPlayers.add(playerName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user