1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-25 13:28:58 +02:00

Use slightly less spammy logging when user data isn't loaded in Bungee permission check handling

This commit is contained in:
Luck
2020-04-05 16:25:33 +01:00
parent fe139f8420
commit c71742a996

View File

@@ -62,8 +62,12 @@ public class BungeePermissionCheckListener implements Listener {
User user = this.plugin.getUserManager().getIfLoaded(player.getUniqueId()); User user = this.plugin.getUserManager().getIfLoaded(player.getUniqueId());
if (user == null) { if (user == null) {
this.plugin.getLogger().warn("A permission check was made for player " + player.getName() + " - " + player.getUniqueId() + ", " +
"but LuckPerms does not have any permissions data loaded for them. Perhaps their UUID has been altered since login?");
new Exception().printStackTrace();
e.setHasPermission(false); e.setHasPermission(false);
throw new IllegalStateException("No permissions data present for player: " + player.getName() + " - " + player.getUniqueId()); return;
} }
QueryOptions queryOptions = this.plugin.getContextManager().getQueryOptions(player); QueryOptions queryOptions = this.plugin.getContextManager().getQueryOptions(player);
@@ -88,8 +92,12 @@ public class BungeePermissionCheckListener implements Listener {
User user = this.plugin.getUserManager().getIfLoaded(player.getUniqueId()); User user = this.plugin.getUserManager().getIfLoaded(player.getUniqueId());
if (user == null) { if (user == null) {
this.plugin.getLogger().warn("A permission check was made for player " + player.getName() + " - " + player.getUniqueId() + ", " +
"but LuckPerms does not have any permissions data loaded for them. Perhaps their UUID has been altered since login?");
new Exception().printStackTrace();
e.setResult(Tristate.UNDEFINED); e.setResult(Tristate.UNDEFINED);
throw new IllegalStateException("No permissions data present for player: " + player.getName() + " - " + player.getUniqueId()); return;
} }
QueryOptions queryOptions = this.plugin.getContextManager().getQueryOptions(player); QueryOptions queryOptions = this.plugin.getContextManager().getQueryOptions(player);