mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Locale.ROOT
param
This commit is contained in:
parent
151fb08db8
commit
bfc30a8703
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user