LuckPerms

LuckPerms

41.4k Downloads

silently add user permissions

aparry91 opened this issue ยท 8 comments

commented

Description

Add the ability to flag -s on other commands such as user permissions rather than outputting - running LP Perms

Proposed Behaviour

Aid with keeping players immersed and not identifying that a LP command is being run to a general player

Extra Details

No response

commented

normal players should not be running luckperms commands to get an output beyond just the version number

commented

I think it's a good idea to add this feature. Could be used to prevent administrators from receiving certains log messages from luckperms on a big server

commented

there is already a command that players with permission to see the log can use to stop seeing log messages in game.

commented

normal players should not be running luckperms commands to get an output beyond just the version number

In my instance I am adding a click event that runs a luckperms command, normal player 'accepts' the dialogue, and shortly after is greeted with a beautifully big bright LP message to indicate it is running - I feel it is unecessary for normal players to have this info and removes from the immersive experience. If the normal player is not running a version check, I feel they shouldn't be informed about the background process of a click event.

command attached to the click event is
/lp user @p permission set quest_accepted.heimerdinger.a true
Untitled

Command is correctly run, and permission is correctly added as expected, its the message that is irrelevant for the normal user

Note: also added the permission node
luckperms.* false
just to make sure, normal user still receives the same message

commented

This sounds more like an issue with your setup. Are you making the event run the command as the player? You shouldn't be doing this, make the command run from console instead if possible.

commented

This sounds more like an issue with your setup. Are you making the event run the command as the player? You shouldn't be doing this, make the command run from console instead if possible.

Hmm well, the player right clicks the Confirm, with all luck perm permissions set to false, and then it initiates the command through Mythic Mobs, populates the trigger.name as the player who triggered the events name, Trigger being a right click on a mob and seems to get the info message

/lp user <trigger.name> permission set quest_accepted.heimerdinger.a true

I'm not very java savvy or anything like that but:

This seems to be where the Running version message is generated, sitting under:
Args2<LuckPermsPlugin, Map<Component, Component>> INFO = (plugin, storageMeta) -> join(newline()

And the user promote/demote has examples of a flag to silence the message like so:
silence example in user demote
conditional for silence message

was thinking I could add something similar in here

just not really sure if this is where the message is being generated or if that is being consumed by PermissionSet.java

commented

This sounds more like an issue with your setup. Are you making the event run the command as the player? You shouldn't be doing this, make the command run from console instead if possible.

Exactly this - the command triggers should be executed as the console, not as the player.

Seems like mythicmobs supports this: https://git.mythiccraft.io/mythiccraft/MythicMobs/-/wikis/skills/mechanics/command

if you configure this correctly, the player shouldn't get the "running luckperms version aaa" feedback in their chat.

commented

This sounds more like an issue with your setup. Are you making the event run the command as the player? You shouldn't be doing this, make the command run from console instead if possible.

Exactly this - the command triggers should be executed as the console, not as the player.

Seems like mythicmobs supports this: https://git.mythiccraft.io/mythiccraft/MythicMobs/-/wikis/skills/mechanics/command

if you configure this correctly, the player shouldn't get the "running luckperms version aaa" feedback in their chat.

Hi @lucko

actually already tried setting up the command mechanic to work with the tellraw command, running with the asOp functionality:
it gives the same result as the jsonmessage mechanic: I feel the only difference is that jsonmessage allows you to nicely view your message. I have infact even tried using the asCaster attribute.

According to MythicMob docs if setup with asOp attribute, The player that Triggers the command with right click actually executes the command with all permissions

I've tried running the command in several ways, I have uploaded the variations to your hosted lucko/paste here, all ended with the same result:
Untitled