Silence subject load errors unless debug-permission-checks is true

This commit is contained in:
Luck 2016-09-29 20:02:38 +01:00
parent 41744f9416
commit becdfd6f03
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -95,7 +95,9 @@ public class UserCollection implements SubjectCollection {
}
}
service.getPlugin().getLog().warn("Couldn't get subject for: " + id);
if (service.getPlugin().getConfiguration().isDebugPermissionChecks()) {
service.getPlugin().getLog().warn("Couldn't get user subject for: " + id);
}
// What am I meant to do here? What if no user is loaded? Load it? Create it?
// If I do load/create it, this method should always be called async??.... errr.