Would a sponge plugin similar to this be possible? I run a small SpongeForge server and although I want a few of my players to have access to command blocks for building purposes, I don’t want everyone in creative to be able to run commands related to my permissions plugin (for obvious reasons ) Essentially, it would be a whitelist system for command blocks. Any ideas greatly appreciated!
Technically it would be possible to intercept any command and check if the command source is a command block. Then check who placed that block (something like block owner in sponge) and check it that player has the permission to execute the command in the command block.
Or do you mean checking for permission of the player who triggered the command block.
@RandomByte Well I was under the impression that it wouldn’t be possible to limit the commands a player could run in the command block to the commands they had permissions for due to the fact that commands in command blocks are run as if they had been typed into console, but if that is possible that would definitely be a better system.
My original idea was just a simple whitelist system which would check to see if a player was authorized to use command blocks before allowing them to interact with the block.
that is already possible command blocks have their own permission node by default
minecraft.commandblock.edit.minecart see https://docs.spongepowered.org/stable/en/server/spongineer/commands.html#vanilla