LuckPerms

LuckPerms

41.4k Downloads

Add support for the @a selector

kakduman opened this issue ยท 4 comments

commented

I'd like to have an option on my server's Tebex store to give all online players access to color for 24 hours whenever someone donates.

I enabled selectors in the LuckPerms config, but the @a selector does not work. Since @a selects all online users, /lp user @a parent addtemp color 24h selects multiple users. However, LuckPerms throws an error since @a is parsed to an ambiguous result, even though the entire point of @a is that it has multiple results:
[LuckPerms] Error parsing selector '@a' for com.destroystokyo.paper.console.TerminalConsoleCommandSender@65e60cbc executing [user, @a, permission, set, essentials.speed, true]: ambiguous result (more than one player matched) - [CraftPlayer{name=Pempkin}, CraftPlayer{name=Nitre}]

One solution to this would be executing @a commands one time for every single user instead of trying to execute the command one time with multiple users. With support from the Discord, I tried using CommandHook, which makes @a commands execute one time for each user. Unfortunately, CommandHook only works with command blocks, and I can't make Tebex run LuckPerms commands through command blocks.

Would it be possible for you to make commands with @a execute successfully?

Thanks!

commented

For your usecase, would it not just work to give the default group the permissions you want all online players to have? :)

commented

Unfortunately, no. I want to give all online players a certain permission without giving people who newly join the server that permission.

commented

This isn't particularly straightforward for me to solve in LuckPerms - perhaps using a plugin like this might be a good alternative for you?

https://dev.bukkit.org/projects/executeforall

commented

I'll try it out and let you know if it does not work!