mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 12:46:04 +01:00
Catch exceptions in ProfileFetchThread
This commit is contained in:
parent
eeea90ea05
commit
583e633228
@ -192,16 +192,15 @@ class ProfileFetchThread implements Runnable {
|
|||||||
queue.clear();
|
queue.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
fetchRequests(requests);
|
fetchRequests(requests);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Messaging.severe("Error fetching skins: " + ex.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addHandler(final ProfileRequest request, final ProfileFetchHandler handler) {
|
private static void addHandler(final ProfileRequest request, final ProfileFetchHandler handler) {
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), () -> request.addHandler(handler), 1);
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
request.addHandler(handler);
|
|
||||||
}
|
|
||||||
}, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Loading…
Reference in New Issue
Block a user