DrexHD / MeliusCommands

Create custom commands (Fabric, Server side)
MIT License
4 stars 0 forks source link

(Request) Player name/attribute substitution #2

Open Variadicism opened 1 month ago

Variadicism commented 1 month ago

Thank you very much for making this mod! It's critical to my server's setup for so many things! 🙂 But, one addition would make it significantly more powerful for some use cases I've encountered:

There are many commands (notably LuckPerms "user" commands) that require the target player's name to be passed in as an argument. Vanilla selectors like @s have no way to fill this role.

The ability to substitute aspects of the command user into the executed actions would be a huge help.

The only Fabric mod I've found with something like this so far is Player Events, where "custom_commands" can substitute things like "${player.name}" or even "${killedEntity.x}" on a "kill_entity" event. Sadly, this mod is not updated to 1.21 as of this writing and it misses some of the convenient and useful features that your mod provides, most notably permissions restrictions on commands.

So, if you find any time to implement such a thing, I'd be very grateful! 🙂

arvitus commented 1 month ago

Maybe it would be possible to make it so one could use placeholders in the commands. This way you could access not only player attributes but also for the server or even other mods.