mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 04:26:42 +00:00
use Locale.ROOT for uppercase as well
This commit is contained in:
@ -30,6 +30,7 @@ import com.sk89q.worldedit.world.block.BlockCategory;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -49,7 +50,7 @@ public class BlockCategoryPatternParser extends InputParser<Pattern> {
|
||||
if (!input.startsWith("##")) {
|
||||
return null;
|
||||
}
|
||||
String tag = input.substring(2).toLowerCase();
|
||||
String tag = input.substring(2).toLowerCase(Locale.ROOT);
|
||||
boolean anyState = false;
|
||||
if (tag.startsWith("*")) {
|
||||
tag = tag.substring(1);
|
||||
|
@ -49,6 +49,7 @@ import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@ -107,7 +108,7 @@ public class DefaultPatternParser extends FaweParser<Pattern> {
|
||||
() -> {
|
||||
if (full.length() == 1) return new ArrayList<>(dispatcher.getPrimaryAliases());
|
||||
return dispatcher.getAliases().stream().filter(
|
||||
s -> s.startsWith(command.toLowerCase())
|
||||
s -> s.startsWith(command.toLowerCase(Locale.ROOT))
|
||||
).collect(Collectors.toList());
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user