LuckPerm: keep contexts active after reload of groups (#2186)
* Use context aware groups * Revert "Use context aware groups" This reverts commit 5adc6ef7 * Keep luckperm contexts after authentication * Code cleanup * Code cleanup * Fix nullpointer for context maps * Code cleanup * Use uuids for sqlite and postgresql * Revert "Use uuids for sqlite and postgresql" This reverts commit 05296e5f23bd4379a89647656f08432c718e6f9c. * Cleanup imports * Fix test Co-authored-by: David Maes <david.maes@kbc.be>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package fr.xephi.authme.command.executable.authme.debug;
|
||||
|
||||
import fr.xephi.authme.data.limbo.UserGroup;
|
||||
import fr.xephi.authme.permission.DebugSectionPermissions;
|
||||
import fr.xephi.authme.permission.PermissionNode;
|
||||
import fr.xephi.authme.permission.PermissionsManager;
|
||||
@@ -11,6 +12,8 @@ import org.bukkit.entity.Player;
|
||||
import javax.inject.Inject;
|
||||
import java.util.List;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
/**
|
||||
* Outputs the permission groups of a player.
|
||||
*/
|
||||
@@ -37,8 +40,11 @@ class PermissionGroups implements DebugSection {
|
||||
if (player == null) {
|
||||
sender.sendMessage("Player " + name + " could not be found");
|
||||
} else {
|
||||
sender.sendMessage("Player " + name + " has permission groups: "
|
||||
+ String.join(", ", permissionsManager.getGroups(player)));
|
||||
List<String> groupNames = permissionsManager.getGroups(player).stream()
|
||||
.map(UserGroup::getGroupName)
|
||||
.collect(toList());
|
||||
|
||||
sender.sendMessage("Player " + name + " has permission groups: " + String.join(", ", groupNames));
|
||||
sender.sendMessage("Primary group is: " + permissionsManager.getGroups(player));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user