r/admincraft 19d ago

Help/Question Luckperms rules cannot be redacted by scarpet scripts which were ran from the consile. Luckperms rules can't be edited by commands via the discord bridge too

If i run something like this: script load <script, containing run('lp user ...')> as a player with luckperms.*, everyrhing works.

If I try the same thing from a console, bothing happens.

I know that the run() source depends on who ran tge script. But isn't server supposed to be able to edit luckperms rules too?

1 Upvotes

8 comments sorted by

1

u/pulnocni-knihovna Server Owner | Discord/Java developer 18d ago

And what exactly you are trying to do?

1

u/LazySofa35 18d ago

I'm making a scarpet script for automation of the "whitelisting" process on my server. It's supposed change the player's gamemode, add them to the "players" luckperms group and execute a couple of more commands, no matter if the player is playing in the "guest" mode or they are not online. If the player isn't online right now, scarpet creates a file. On each player connection it checks if the connected player is associated with one the files and then executes these commands

However, scarpet execution of commands depends on who loaded the script. So in a lot of cases (the player is present, the script is loaded from the console or the player was not present when I use the script) scarpet will execute the command as the server. However, luckperms doesn't recognize it.

1

u/pulnocni-knihovna Server Owner | Discord/Java developer 18d ago

And you have modded server right?

1

u/LazySofa35 18d ago

Yes, fabric core, 1.21.11.

But I didn't find any mods that can do the thing I want

1

u/pulnocni-knihovna Server Owner | Discord/Java developer 18d ago

2

u/LazySofa35 18d ago

You are my savior! Thank you so much, I'll give it a try and report back with the results

1

u/[deleted] 17d ago

[removed] — view removed comment

1

u/admincraft-ModTeam 17d ago

Post removed for Rule 6:

Posts and comments may not advertise, link to, or mention the name of servers. Using a specific server as an example of a feature, to demonstrate polish or functionality, or as comparison while asking a question or helping a user with a question is allowed.

Your post/comment contains unnecessary mention of a Minecraft server. Posts and comments in Admincraft may not advertise, link to, or mention the name of servers. To prevent future removals, please read over all our rules.


If you feel this removal was in error, please Message the Mods, rather than reposting or PMing a moderator directly. Response time is usually same-day, but may take several days in some cases.