mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +01:00
Make #getPlayerGroups return global too
This commit is contained in:
parent
3c83c578eb
commit
659baaf5fb
@ -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]);
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ public abstract class User extends PermissionHolder implements Identifiable<UUID
|
||||
* @param includeGlobal Whether to include global groups
|
||||
* @return a {@link List} of group names
|
||||
*/
|
||||
private List<String> getGroups(String server, String world, boolean includeGlobal) {
|
||||
public List<String> getGroups(String server, String world, boolean includeGlobal) {
|
||||
// Call super #getPermissions method, and just sort through those
|
||||
Map<String, Boolean> perms = exportNodes(server, world, null, includeGlobal, true, null);
|
||||
return perms.keySet().stream()
|
||||
|
Loading…
Reference in New Issue
Block a user