mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Rate limit mojang api requests & don't make requests for tab completion
This commit is contained in:
7 files changed
+82
-22
No files matched your search
@@ -76,7 +76,7 @@ public final class CarbonServerFabric implements CarbonServer, ForwardingAudienc
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<@Nullable UUID> resolveUUID(final String username) {
|
||||
public CompletableFuture<@Nullable UUID> resolveUUID(final String username, final boolean cacheOnly) {
|
||||
final @Nullable ServerPlayer serverPlayer = this.carbonChatFabric.minecraftServer().getPlayerList().getPlayerByName(username);
|
||||
if (serverPlayer == null) {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
@@ -85,7 +85,7 @@ public final class CarbonServerFabric implements CarbonServer, ForwardingAudienc
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<@Nullable String> resolveName(final UUID uuid) {
|
||||
public CompletableFuture<@Nullable String> resolveName(final UUID uuid, final boolean cacheOnly) {
|
||||
final @Nullable ServerPlayer serverPlayer = this.carbonChatFabric.minecraftServer().getPlayerList().getPlayer(uuid);
|
||||
if (serverPlayer == null) {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
|
||||
Reference in new issue
Block a user