Possible fix for permissions not applying on BungeeCord

This commit is contained in:
Luck 2016-09-09 18:32:50 +01:00
parent fc230291d3
commit f28721e55a
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -60,7 +60,15 @@ public class BungeeListener extends AbstractListener implements Listener {
final String server = player.getServer() == null ? null : (player.getServer().getInfo() == null ? null : player.getServer().getInfo().getName()); final String server = player.getServer() == null ? null : (player.getServer().getInfo() == null ? null : player.getServer().getInfo().getName());
Map<String, Boolean> local = user.getLocalPermissions(plugin.getConfiguration().getServer(), server, null, Collections.singletonList(e.getPermission())); Map<String, Boolean> local = user.exportNodes(
plugin.getConfiguration().getServer(),
server,
null,
plugin.getConfiguration().getIncludeGlobalPerms(),
true,
Collections.singletonList(e.getPermission())
);
for (Map.Entry<String, Boolean> en : local.entrySet()) { for (Map.Entry<String, Boolean> en : local.entrySet()) {
if (en.getKey().equalsIgnoreCase(e.getPermission())) { if (en.getKey().equalsIgnoreCase(e.getPermission())) {
e.setHasPermission(en.getValue()); e.setHasPermission(en.getValue());