1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-03 11:22:33 +02:00

Fix track editor command for empty tracks (£2997)

This commit is contained in:
Luck
2021-04-22 20:32:43 +01:00
parent 8741e8259f
commit 1d465aa800

View File

@@ -73,6 +73,11 @@ public class TrackEditor extends ChildCommand<Track> {
// remove groups which the sender doesn't have perms to view
groups.removeIf(holder -> ArgumentPermissions.checkViewPerms(plugin, sender, getPermission().get(), holder) || ArgumentPermissions.checkGroup(plugin, sender, holder, ImmutableContextSetImpl.EMPTY));
if (groups.isEmpty()) {
Message.EDITOR_NO_MATCH.send(sender);
return CommandResult.FAILURE;
}
// then collect users which are a member of any of those groups
// (users which are on the track)
List<PermissionHolder> users = new ArrayList<>();