Client and Server Commands

Difference between client and server commands


As already said, this mod can be used as normal minecraft mod and as dedicated server mod. Minecraft is split up into two parts: the client side, which is the normal game you launch and a server side which is a dedicated server or an internal server if you play in singleplayer. By default commands are always handled by the server, so if you join a server, the server must have this mod installed to use commands. Forge adds the possibility to handle commands client side, so you can use some commands on servers not having this mod installed. Nevertheless the majority of the commands are handled server side, simply because they must operate on the server. There are also commands which require the mod to be installed on both sides, either only for the player executing a command or for all players on the server. To sum it up, there are three kinds of commands:

  • Client Commands: These commands require only the client to have the mod installed to work properly, e.g. the "clouds" command
  • Server Commands: These commands require only the server to have the mod installed to work properly, e.g. the "fly" command
  • Client-Server Commands: These commands require both sides to have the mod installed to work properly, e.g. the "noclip" command
  • Some commands can be available on both the client and the server (e.g. the "position" command) because the are able to operate on both sides.

    If a command is a client-server command - that means both sides require an installation - it can either be the case that only the client/player who executes the command needs a client side installation or all clients need an installation of MoreCommands (currently only the case for the "blocklight" command because all clients need to know about changes of block properties). If the latter one is the case, you need to force clients to have the mod installed. It's pretty simple to do that by not accepting any connection attempt of a client who doesn't have MoreCommands. This can be done by setting the "clientsMustHaveMod" property of the configuration file to "true". (See Configuration for more details).

    You can disable ALL client commands by typing "/clientcommands disable" (or "enable" to enable) into the chat console.