mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-27 11:37:35 +01:00
Fix UnsupportedOperationExceptions with #getPermissions
This commit is contained in:
parent
9b4384dc33
commit
56df2477ca
@ -249,7 +249,7 @@ public abstract class PermissionHolder {
|
||||
* @return a set of nodes
|
||||
*/
|
||||
public SortedSet<LocalizedNode> getAllNodes(List<String> excludedGroups, Contexts context) {
|
||||
SortedSet<LocalizedNode> all = getPermissions(true);
|
||||
SortedSet<LocalizedNode> all = new TreeSet<>((SortedSet<LocalizedNode>) getPermissions(true));
|
||||
|
||||
if (excludedGroups == null) {
|
||||
excludedGroups = new ArrayList<>();
|
||||
@ -310,7 +310,7 @@ public abstract class PermissionHolder {
|
||||
if (context.isApplyGroups()) {
|
||||
allNodes = getAllNodes(null, context);
|
||||
} else {
|
||||
allNodes = getPermissions(true);
|
||||
allNodes = new TreeSet<>((SortedSet<LocalizedNode>) getPermissions(true));
|
||||
}
|
||||
|
||||
Map<String, String> contexts = new HashMap<>(context.getContext());
|
||||
|
Loading…
Reference in New Issue
Block a user