First: apologies for being an idiot and initially adding this to the Waterfall project. I don't know how I managed to mix those up, but it happened. Won't happen again.
This is a feature suggestion based on my question on the Aquifer forum as seen here.
In the current situation any functions which get triggered from an advancement are ran from the users context, on a regular server this means it runs without op status. I'm wondering if it is possible to somehow allow for this behavior to be overridden.
Basically for 2 main reasons. First and foremost: this behavior would be equal to that of the vanilla server, and in my opinion it also makes more sense. After all: the server triggers the advancement so why would it need to be run from within the users context (I'm aware of security concerns)? Another thing which irks me a little bit about the current behavior is that whenever a user triggers a commandblock then whatever gets executed will be run within the server context (elevated). So why would an advancement be any different?
Second: this would open up a lot of options for server owners (and map designers alike I guess) to provide users with a more customized experience. Think about rewarding them with customized items, but also about performing certain tasks which would otherwise be impossible.
Thanks in advance for your attention.
This was removed from signs due to the security risk with signs being more controlled by the client, but for advancements, them being completely op-managed, I can see this being a legit thing, though we would still want to put it behind a default-off flag for safety sake.
then the server owner would be opting in to the knowledge that they are opening up a risk if they ever 'screwed up'.
Though, I think this could be solved by a plugin too, and may be the better approach here than adding this to Paper
PlayerAdvancementDoneEvent, create a config key that says "on this advancement, run this"
I think I can whip something up for this pretty fast, let me try, then we can evaluate if this method doesnt work if it needs to be a paper feature.
@ShelLuser, I wrote a small plugin that should meet the needs. https://github.com/aikar/AdvancementCommand
The only reason I could see to do something at the Paper level was to fix support for data packs, which is ideal, so im not closing this.
But the plugin should resolve the need to be able to run commands at elevated permission on advancement completion.
\o.o/ my first public plugin.
@ShelLuser looks like CraftBukkit already supports this
Set unrestricted-advancements=true in commands.yml
Most helpful comment
@ShelLuser, I wrote a small plugin that should meet the needs. https://github.com/aikar/AdvancementCommand
The only reason I could see to do something at the Paper level was to fix support for data packs, which is ideal, so im not closing this.
But the plugin should resolve the need to be able to run commands at elevated permission on advancement completion.
\o.o/ my first public plugin.