add exception handling to save in cleanup

This commit is contained in:
Jason Penilla committed 2023-03-23 15:08:08 -07:00
1 parent 1d283a64ea
commit 154569b208
1 file changed
+4 -1
@@ -118,7 +118,10 @@ public abstract class CachingUserManager implements UserManagerInternal<CarbonPl
continue;
}
this.cache.remove(entry.getKey());
this.save(getNow);
this.save(getNow).exceptionally(thr -> {
this.logger.warn("Exception saving data for player {} with UUID {}", getNow.username(), getNow.uuid(), thr);
return null;
});
}
} finally {
this.cacheLock.unlock();