commands do not work when used with default target selector variables (@p, @e, etc)
See original GitHub issueENVIRONMENT: running CraftBukkit version git-Spigot-b6ecf3b-9060bfa (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT) and running only one plugin, LuckPerms (v.4.1.63) [EDIT: re-verified behavior on latest LP version]
PROBLEM: when a user or group has been given permission to use commands that normally accept default target selector variables, such as @p @e and so on, these commands will not work when that command is used with a target selector variable. the commands return messages such as “Player ‘@p’ not found” or “Entity ‘@e’ not found”.
CAVEATS: the same command WILL work if the command does not use a target selector variable, but instead names the player. Commands with target selector variables continue to work as expected when the user has default minecraft Operator privelege, although this defeats the intent of LuckPerms and so is not a workaround
STEPS TO REPRODUCE.
(1) ensure you do not have minecraft “op” privilege set for your [username]
(2) use luckperms to assign your non-op [username] the “minecraft.command.give
” permission, or assign the user to a group that has this permission enabled.
(3) type in the user command window “/give @p dirt
”. the result will be “Player '@p' not found
”
(4) type in the user command window “/give [username] dirt
”. the result will be to give <username> one block of dirt.
other commands, such as ‘kill’, ‘tell’, ‘teleport’, and any other plugin commands that use target selector variables (@p, @a, @e, @r, @s
) all behave in this manner.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Yes, you’re right, the Essentials commands don’t support selectors.
In fact, in general, Bukkit plugin commands will not support selectors, as this isn’t exposed in the Bukkit API.
Perhaps that’s the problem you’re encountering? If the Vanilla commands aren’t working with selectors, then this sounds like a Spigot/CraftBukkit bug. You could try reproducing it without any plugins on the server?
It’s definitely unrelated to LuckPerms. 😃
Sorry if I came across as defensive, that wasn’t my intention - but I can see my message might’ve come across that way. I was just trying to get to the point 😃
I’m quite tired at the moment so can’t really give this issue my full thought - I’ll try look into this a bit more / work out a reply sometime tomorrow - if that’s okay. 😄