From 817df76468e53a08befc0eaa577919f8ac28f2b4 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 10 Nov 2024 07:51:12 +0800 Subject: [PATCH] Trial treating 403 Forbidden as too many requests --- .../net/citizensnpcs/npc/skin/profile/ProfileFetchThread.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/npc/skin/profile/ProfileFetchThread.java b/main/src/main/java/net/citizensnpcs/npc/skin/profile/ProfileFetchThread.java index 284cc88de..9d11e8a5c 100644 --- a/main/src/main/java/net/citizensnpcs/npc/skin/profile/ProfileFetchThread.java +++ b/main/src/main/java/net/citizensnpcs/npc/skin/profile/ProfileFetchThread.java @@ -248,8 +248,8 @@ class ProfileFetchThread implements Runnable { String message = e.getMessage(); String cause = e.getCause() != null ? e.getCause().getMessage() : null; - return message != null && message.contains("too many requests") - || cause != null && cause.contains("too many requests"); + return message != null && (message.contains("403 Forbidden") || message.contains("too many requests")) + || cause != null && (cause.contains("403 Forbidden") || cause.contains("too many requests")); } private static void sendResult(ProfileFetchHandler handler, ProfileRequest request) {