Minecraft – How to give players the `/whitelist add ` command in the Minecraft server

minecraft-commandsminecraft-java-editionminecraft-java-edition-server

I'd like to give some of my players the ability to add other players to my server's whitelist, but I don't want to make them operators (as this gives them commands such as /gamemode). Is there a way to give a player access to /whitelist add <player> and only that command?

Best Answer

Vanilla Minecraft does not support this. However, it looks like most if not all permissions plugins do. You will need to use a modded server to accomplish this.

If you are currently running a fully vanilla server, then the decision to mod is a big one. Mainly because once you mod your server, you'll have an increased maintenance load managing it around Minecraft updates, or increased complexity for your users as they have to learn how to log into an out of date server. (This is easy, but some still stumble.)

If you are already modding, then it's an easy decision... For Bukkit or Paper servers, LuckPerms is great. (I have no affiliation with them.) You can create groups or assign permissions to individual users. and to apply permissions, you just need to use commands like:

lp creategroup myPlayas
lp user someGuy parent add myPlayas
lp group myPlayas permission set minecraft.command.whitelist true

Further info: https://github.com/lucko/LuckPerms/wiki

There are other permissions mods for other systems, and they all work relatively the same. Some have more or less features, but all allow granular permissions control.

Good luck!