Fixed bugs that could occur while updating old DBs to have UUIDs

This commit is contained in:
nossr50
2019-05-05 16:41:42 -07:00
parent 588b6f3692
commit 23b7e11dd1
4 changed files with 23 additions and 12 deletions

View File

@ -68,15 +68,18 @@ public class UUIDUpdateAsyncTask extends BukkitRunnable {
}
catch (Exception e) {
// Handle 429
if (e.getMessage().contains("429")) {
size += userNamesSection.size();
try {
Thread.sleep(LIMIT_PERIOD);
} catch (InterruptedException ex) {
e.printStackTrace();
return;
if(e.getMessage() != null)
{
if (e.getMessage().contains("429")) {
size += userNamesSection.size();
try {
Thread.sleep(LIMIT_PERIOD);
} catch (InterruptedException ex) {
e.printStackTrace();
return;
}
continue;
}
continue;
}
plugin.getLogger().log(Level.SEVERE, "Unable to fetch UUIDs!", e);