From 659baaf5fb575e89d47f8fe617718eb1507509b9 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 29 Aug 2016 21:35:11 +0100 Subject: [PATCH] Make #getPlayerGroups return global too --- .../java/me/lucko/luckperms/api/vault/VaultPermissionHook.java | 2 +- common/src/main/java/me/lucko/luckperms/users/User.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultPermissionHook.java b/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultPermissionHook.java index 40f03ba4..8234233b 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultPermissionHook.java +++ b/bukkit/src/main/java/me/lucko/luckperms/api/vault/VaultPermissionHook.java @@ -195,7 +195,7 @@ public class VaultPermissionHook extends Permission { public String[] getPlayerGroups(String world, @NonNull String player) { final User user = plugin.getUserManager().get(player); return (user == null) ? new String[0] : - world != null && !world.equals("") ? user.getLocalGroups("global", world).toArray(new String[0]) : + world != null && !world.equals("") ? user.getGroups("global", world, true).toArray(new String[0]) : user.getGroupNames().toArray(new String[0]); } diff --git a/common/src/main/java/me/lucko/luckperms/users/User.java b/common/src/main/java/me/lucko/luckperms/users/User.java index 2183e54e..70beddb0 100644 --- a/common/src/main/java/me/lucko/luckperms/users/User.java +++ b/common/src/main/java/me/lucko/luckperms/users/User.java @@ -325,7 +325,7 @@ public abstract class User extends PermissionHolder implements Identifiable getGroups(String server, String world, boolean includeGlobal) { + public List getGroups(String server, String world, boolean includeGlobal) { // Call super #getPermissions method, and just sort through those Map perms = exportNodes(server, world, null, includeGlobal, true, null); return perms.keySet().stream()