Locale.ROOT param

This commit is contained in:
Rothes 2022-03-26 09:09:50 +08:00
parent 151fb08db8
commit bfc30a8703
No known key found for this signature in database
GPG Key ID: 6CE8D36FC18B617F

View File

@ -125,7 +125,7 @@ public final class LocalExpansionManager implements Listener {
public PlaceholderExpansion getExpansion(@NotNull final String identifier) {
expansionsLock.lock();
try {
return expansions.get(identifier.toLowerCase());
return expansions.get(identifier.toLowerCase(Locale.ROOT));
} finally {
expansionsLock.unlock();
}
@ -193,7 +193,7 @@ public final class LocalExpansionManager implements Listener {
@ApiStatus.Internal
public boolean register(@NotNull final PlaceholderExpansion expansion) {
final String identifier = expansion.getIdentifier().toLowerCase();
final String identifier = expansion.getIdentifier().toLowerCase(Locale.ROOT);
if (!expansion.canRegister()) {
return false;
@ -286,7 +286,7 @@ public final class LocalExpansionManager implements Listener {
@ApiStatus.Internal
public boolean unregister(@NotNull final PlaceholderExpansion expansion) {
if (expansions.remove(expansion.getIdentifier().toLowerCase()) == null) {
if (expansions.remove(expansion.getIdentifier().toLowerCase(Locale.ROOT)) == null) {
return false;
}