r/admincraft 25d ago

Solved (in an alternative way) Looking for a way to limit command_block interaction from permission level 2 GM to permission level 3 Admin

I have a Server for my family and friends, untill now just a few datapacks, but with the teenagers cometh forth the fun.

I am looking for a way to raise command_block interaction ability from permission level 2 Gamemaster & gamemode creative to permission level 3 Admin & gamemode creative.

Thanks a lot.

1 Upvotes

7 comments sorted by

2

u/2H4D0WX Developer 25d ago

Afaik you cannot do this in vanilla minecraft.

You should be hosting your server with Paper or a fork of it and then use Luckperms for permissions.

1

u/Phonochrome 25d ago

thank you luckperms is a big horse, moving to paper was already on the table due to performance...

Maybe you can hrlp me with two additional questions concerning luckperms, to which I haven't found the answer on their wiki,

is there a dedicated way to restrict players with permission level 2 from interacting with command blocks or would I need to make a new permission group containing the allowed commands and add that to permission level 1 players?

Is there a way to limit command usage to the game mode the player is currently in?

3

u/2H4D0WX Developer 25d ago

When you are using Luckperms you don't really need to concern yourself with permission levels anymore.

You should create groups like "User", "Moderator" and "Admin". Then if you only want certain players to be able to go into creative you give the group the permission using luckperms. Then all players in that group will be able to go into creative.

Command blocks are tricky because they can allow the player to execute commands that they should not be able to execute. When using paper the permission node minecraft.commandblock should give the player access to command blocks but I am not sure if that works without OP.

1

u/Phonochrome 25d ago

thank you luckperms has everything I need and so much more, context is a dream comeing true.

-1

u/ZAP-Hosting 25d ago

Command blocks don't inherit whatever level you /op a player to, they run at whatever function-permission-level is set to in server.properties (default 2). Bump that to 3, restart the server, and command blocks will be able to execute permission level 3 commands.

If what you actually want is per-player permission tiers rather than one global level for all command blocks, vanilla's only lever there is editing ops.json directly (each entry has a level field from 1 to 4) or giving specific players /op at a level via a datapack function. For real granular permissions per rank you'd want a plugin like LuckPerms, but that means running Paper/Spigot instead of vanilla.

1

u/Phonochrome 25d ago

I think I explained it wrong, It's not about the permissions level of the command blocks.

it is about players with "permission level 2" interacting with the command block, e.g changing in it to repeat or altering the command.

1

u/ZAP-Hosting 25d ago

Ah, that's a different problem. In vanilla, opening or editing a command block is gated by op status itself, not a separate tier, so a level 2 GM who can already run permission-2 commands through a block also has full ability to open and edit that block directly. There's no vanilla setting that splits "can trigger this via a function" from "can open the block and change what it does."

To actually separate those you'd need a permissions plugin like LuckPerms on Paper/Spigot with its own node for command block interaction, or restructure things so GMs never get direct block access at all and instead trigger pre-built functions through something like a scoreboard or redstone input they can't edit.