0

How do I keep players from accessing certain commands? I'm making a server and these kind of things are thing i need to know

5
  • I think we had a similar question before, but I can't find it. Maybe somebody who is more familiar with the minecraft tag can locate it.
    – kotekzot
    Commented Apr 9, 2014 at 2:24
  • 1
    What commands are you wanting to restrict access to? Players that are not OP'd cannot do a whole lot with commands, unless you have plugins installed.
    – Gigazelle
    Commented Apr 9, 2014 at 2:51
  • In survival mode, almost all commands are disabled, with the exclusion of /help, /trigger, /me, /msg, and /say Commented Nov 29, 2016 at 6:17
  • Maybe someone can suggest a better title and the OP would be kind enough to edit it? I came here based off matching the answers and found it useful.
    – NeilG
    Commented Aug 13, 2021 at 12:16
  • 1
    Please see What to do before asking a minecraft-commands question? - especially the part about "what you've tried so far." Commented Mar 4, 2022 at 1:20

3 Answers 3

6

By default, the majority of commands (with the exception of /me, /tell, /help, and /trigger for some reason) are restricted to server ops. Players are, by default, not allowed to use any other commands on a server. Server ops can use other commands. You can specify ops in the ops.txt file, or by using the command /op <playername> in the console, or in-game (assuming you have added yourself as an op).

By default, server ops have access to all commands, including commands like /stop. You can change this by modifying the op-permission-level in your server.properties file. Setting it to 4 (which is the default) allows ops to use all commands. Setting it to 3 restricts the /stop command, setting it to 2 restricts server moderation commands (/kick, /ban, /op, /deop), and setting it to 1 removes all special permissions from ops other than the ability to bypass spawn protection. You can still use all of these commands in the server console.

4
  • thank you for the complete, accurate and thoughtful answer. I didn't ask the question, but I didn't know all the information you provided. It is very helpful.
    – Luke
    Commented Apr 9, 2014 at 21:31
  • What does op-permission-level 1 and zero do?
    – NeilG
    Commented Aug 13, 2021 at 12:15
  • 1
    @NeilG op-permission-level 1 restricts all commands, and only gives ops the power to bypass spawn protection
    – Unionhawk
    Commented Aug 13, 2021 at 13:19
  • so like "/op (player) gamemode"? Commented Jan 27, 2022 at 1:33
3

Adding on to @Unionhawk's answer you could aternatively just use a permissions plugin such as Group Manager or PermissionsEX with Bukkit along with the Essentials plugins. I'd definitely recommend reading some guides on running a Minecraft server, this not the best guide but a guide nonetheless and should point you in the right direction. Just google around to try find a guide that will suit you best in your objective.

-4

there are 3 steps- 1. In order for players to be able to break blocks near spawn, (spawn protection) they must be OP. So OP them.
2. close the server, and open the server.properties file . 3. change the OP permission level to 1. this will restrict all OPs, so they no longer have commands. But, they can still break blocks around spawn.
If you want to run commands, you must run them out of the server console.

Not the answer you're looking for? Browse other questions tagged .