Fix NPE with Vault #getPlayerGroups

This commit is contained in:
Luck 2017-08-05 17:30:40 +02:00
parent 5784458d03
commit 77956d69ad
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -352,7 +352,7 @@ public class VaultPermissionHook extends Permission {
String w = world; // screw effectively final
return user.getNodes().values().stream()
.filter(Node::isGroupNode)
.filter(n -> n.shouldApplyWithContext(createContextForWorldLookup(plugin.getPlayer(user), w).getContexts()))
.filter(n -> n.shouldApplyWithContext(createContextForWorldLookup(player, w).getContexts()))
.map(Node::getGroupName)
.toArray(String[]::new);
}