From 400d014e7b9fe22fb54e718001904f7bf02295c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Sat, 21 Nov 2015 14:41:14 +0100 Subject: [PATCH] Fixed setGroup in PermissionsManager for Essentials Group Manager and zPermissions --- .../xephi/authme/permission/PermissionsManager.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java index 104a986c1..45f4e8cd3 100644 --- a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java +++ b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java @@ -480,16 +480,17 @@ public class PermissionsManager { case ESSENTIALS_GROUP_MANAGER: // Essentials Group Manager - final AnjoPermissionsHandler handler = groupManagerPerms.getWorldsHolder().getWorldPermissions(player); + /*final AnjoPermissionsHandler handler = groupManagerPerms.getWorldsHolder().getWorldPermissions(player); if(handler == null) - return false; - // TODO: Write proper code here! - //return Arrays.asList(handler.getGroups(player.getName())); + return false;*/ + // Add the user to the group + // TODO: Clear the current list of groups? + return Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "manuadd " + player.getName() + " " + groupName); case Z_PERMISSIONS: //zPermissions - // TODO: Write proper code here! - //return new ArrayList(zPermissionsService.getPlayerGroups(player.getName())); + // Set the players group through the plugin commands + return Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "permissions player " + player.getName() + " setgroup " + groupName); case VAULT: // Vault