CommandBlockPermissions icon

CommandBlockPermissions -----

Allow players to use command blocks without being OP!



This plugin requires ProtocolLib.

Overview
This is a pretty simple plugin that allows admins to use command blocks without being OP, in case you try to avoid handing out OP to people. Of course, command blocks run commands as operators, so you still have to be careful.

How it works
The way it works is a bit interesting. Since a few major MC versions ago, a client will not even attempt to open command blocks unless it believes it's a server operator. Spigot servers actually decide whether or not clients can use command blocks based on the permission node minecraft.commandblock. So, all this plugin does is send a special packet to the client to make it believe it has OP level 2, the minimum required to use command blocks. To be clear, we don't actually OP the player, we just make the client think we did. You don't need to be concerned that a demoted admin can still edit command blocks either. Since it's a fake OP packet, on the next login the server will tell the client its real OP status. And as stated below, they would still require minecraft.commandblock as well.

How to use
The only command is /editcommandblock, or /ecb for short. It's a toggle between on and off mode. The permission is commandblockpermissions.use. Granting this permission also grants minecraft.commandblock for ease of use. Without minecraft.commandblock, no command block data is sent to the client and they cannot read or write to the command block.

Features
The plugin also supports whitelist mode, blacklist mode, block colon commands, and bypass mode. Please keep in mind OPs will always bypass all restrictions. The bypass permission, if enabled in the config.yml, is commandblockpermissions.bypass.

It is recommended to use whitelist mode and not blacklist, because a blacklist relies on you catching every possible method of getting screwed over and blocking it. If you do really need this feature, it is still there.

There is an option, "command-substitute" that should be set to a block. When set, anytime that block is placed while in edit mode, it will immediately transform into a command block. This is provided as an alternative to having an OP place a command block when you need one. It is disabled by default. Read the v1.3 update notes for more information.

Troubleshooting
If you're getting a scary message that looks like this:
Code (Text):
Block at 0, 64, 0 is Block{minecraft:command_block} but has [email protected] Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.
it means you've specified a tile entity as your command-substitute block. This message is harmless. If you would rather not see it, set your command-substitute block to a block without extra data, like a piston or a brick block.

Any other issues, please PM me or post in the discussion tab, I will get back to you as soon as I can.
Resource Information
Author:
----------
Total Downloads: 747
First Release: May 25, 2020
Last Update: Jan 21, 2021
Category: ---------------
All-Time Rating:
3 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings