Running commands through NPCs without giving players permission to run them elsewhere
I'm having a dilemma where I want player to be able to access a server shop, RTP commands, and other functions through an NPC (ZNPC's+) without giving them the ability to do so outside of the NPC. The issue is when I give them the permission to run the command through luckperms the NPC is running it will also work outside just that NPC, while if they do not have the permission it won't work with the NPC.
I have tried using things like placeholders (%player_name%) and execute as %player_name% run [command] through executing from console but so far nothing I do seems to work. Would like some insight or advice from people who have tried things like this before.

19 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by .deathpacito#0
I am trying to use ZNPCs NPCs to open a menu from shopkeepers using the command /shopkeepers remote Shop-1
worldguard extra flags, lp context and a small region around him
Is this how the above situation is normally handled by servers? Seems quite convoluted for something that should be solvable by some kinda pseudo op command insert
sure that does make sense, join the discord and ask em to add it then
running a thing as op just isnt the best
Is this like a passive aggressive thing or an actual suggestion? I can't tell
actual suggestion, it makes sense to atleast have it as a option
Aight, i'll check with them
Just want to say it's incredibly funny how I clicked on the Znpc+ dev to snoop and he has you as a friend, you're everywhere
wait hwat
i am?
This guy

oh im the sys-admin on one of the servers he works on
lmao
I'm gonna follow this recommendation for now until someone else comes up with a better solution
I have WGextraflags, but can't find a LP context to restrict to the region
enable in config
LP config?
oops im sorry completely wrong plugin ðŸ˜
GitHub
GitHub - LuckPerms/ExtraContexts: Extra contexts for LuckPerms runn...
Extra contexts for LuckPerms running on Bukkit. Contribute to LuckPerms/ExtraContexts development by creating an account on GitHub.
Since i'm on a velocity server does this need to be installed on the proxy or something?
no
just backend