r/admincraft • u/_SpruceStudios • 13h ago
Help/Question Something is blocking functions being triggered by advancements
I use a data pack on my Paper 26.2 server, in which some custom functions are run through advancements. Standard data pack stuff. However, these functions only trigger when a player with OP obtains the advancement, not for other players. Does anybody know what could be going on? Is this a permission nodes issue or something else?
Console logs are normal and show no errors, just the standard "player obtained this advancement" message.
[03:28:08 INFO]: player_name has made the advancement [Advancement Display]
Here is the spark profile, the issue has been happening constantly
https://spark.lucko.me/vuWNw4Ue7y
I have already tried giving players the permission node for the /function command, and enabling the function command in the CommandWhitelist plugin which I thought may have been blocking it. Neither of those solved the problem, unfortunately.
2
u/Master5723 12h ago
i think on paper the commands inside a reward function still get checked against the player's own bukkit perms. easy workaround is to skip the reward and do it from a tick function, execute as @a[advancements={ns:your_adv=true}] run function ns:x then advancement revoke, so it runs with the server's level