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