mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Sync methods in MojangProfileResolver
This commit is contained in:
1 parent
fd31de9d9f
commit
de7b9bd37c
1 file changed
+2
-2
@@ -40,7 +40,7 @@ public class MojangProfileResolver implements ProfileResolver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<@Nullable UUID> resolveUUID(final String username) {
|
||||
public synchronized CompletableFuture<@Nullable UUID> resolveUUID(final String username) {
|
||||
return this.pendingUuidLookups.computeIfAbsent(username, $ -> {
|
||||
final CompletableFuture<@Nullable UUID> mojangLookup = CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
@@ -74,7 +74,7 @@ public class MojangProfileResolver implements ProfileResolver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<@Nullable String> resolveName(final UUID uuid) {
|
||||
public synchronized CompletableFuture<@Nullable String> resolveName(final UUID uuid) {
|
||||
return this.pendingUsernameLookups.computeIfAbsent(uuid, $ -> {
|
||||
final CompletableFuture<@Nullable String> mojangLookup = CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user