mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-02-20 06:21:55 +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
|
* @return a set of nodes
|
||||||
*/
|
*/
|
||||||
public SortedSet<LocalizedNode> getAllNodes(List<String> excludedGroups, Contexts context) {
|
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) {
|
if (excludedGroups == null) {
|
||||||
excludedGroups = new ArrayList<>();
|
excludedGroups = new ArrayList<>();
|
||||||
@ -310,7 +310,7 @@ public abstract class PermissionHolder {
|
|||||||
if (context.isApplyGroups()) {
|
if (context.isApplyGroups()) {
|
||||||
allNodes = getAllNodes(null, context);
|
allNodes = getAllNodes(null, context);
|
||||||
} else {
|
} else {
|
||||||
allNodes = getPermissions(true);
|
allNodes = new TreeSet<>((SortedSet<LocalizedNode>) getPermissions(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> contexts = new HashMap<>(context.getContext());
|
Map<String, String> contexts = new HashMap<>(context.getContext());
|
||||||
|
Loading…
Reference in New Issue
Block a user