Setup a users calculated data when loaded by the SubjectCollection

This commit is contained in:
Luck 2016-11-14 18:55:10 +00:00
parent 9c8097ecb9
commit d95891256b
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -110,6 +110,10 @@ public class UserCollection implements SubjectCollection {
service.getPlugin().getLog().warn("User Subject '" + u + "' was requested, but is not loaded in memory. Loading them from storage now.");
long startTime = System.currentTimeMillis();
service.getPlugin().getStorage().loadUser(u, "null").join();
User user = service.getPlugin().getUserManager().get(u);
if (user != null) {
user.setupData(false);
}
service.getPlugin().getLog().warn("Loading '" + u + "' took " + (System.currentTimeMillis() - startTime) + " ms.");
}