EssentialsX interfering with datapack macro command execution
GrifterMage opened this issue ยท 3 comments
Type of bug
Other unexpected behaviour
/ess dump all
output
Error while creating dump error code: 504. (Using latest Dev build)
Error log (if applicable)
https://gist.github.com/GrifterMage/fbaa197df7f1512ce4a953b0ca903b23
Bug description
Running EssentialsX-2.21.0-dev+102
When running a macro line in a datapack function, Essentials tries to run its own versions of those commands instead of the vanilla ones. It does this even when the command is preceded by an execute...run
command.
In addition, if the macro function is being executed off of an advancement, Essentials behaves as though the player the command is being executed as is running it from chat--it checks the player for permissions.
Steps to reproduce
Create a datapack with a macro function with a single command: $execute if entity $(Data) run item replace entity @s weapon.mainhand with apple
Log on, load the datapack, then run the macro function from console execute as YourNameHere run function foo:bar {Data:"YourNameHere"}
For bonus points, replace the item command on the end of the execute with gamemode creative
, and have the function run off of an advancement that runs a function that runs the macro. (Make sure you don't have permission to run the gamemode command directly.)
Expected behaviour
The item in your main hand should be replaced with an apple in the first case, and in the second you should be put into creative.
Actual behaviour
In the first case, you'll get an error in console saying that only in-game players can use "item". In the second case, you'll get an error in chat saying you don't have access to that command.
Additional Information
No response
Paper issue documented here: PaperMC/Paper#10994
Paper potential fix documented here: PaperMC/Paper#11011
Execute command decided as 'working as intended' here: PaperMC/Paper#10995
tl;dr check out the paperclip in the middle link.
sighs
Why is it that every time I think I've properly narrowed down the cause of some sort of bug and do my best to post a properly-documented issue in the proper github, the problem turns out to actually be in some other project and it turns out I'm just annoying devs with problems they're not responsible for solving?
Apologies.