Xgamingserver
minecraft server ops.json

Adding an OP/Admin to Minecraft server using ops.json and op username

Adding OP(admin) to Minecraft server

In this guide, we will learn how to set a player as OP (admin) (add an admin to a minecraft server)

This can be done in two ways

Method 1 Add a Minecraft server Admin to your ops.json file

Step 1 First you’ll need to login to the dedicated minecraft panel​

Step 2 Select the file manager menu and create a file called ops.json

You can also edit the ops file directly if needed. Note that there are two different ops files. The latest ops file (since 1.7.9) is named ops.json while the older style of ops file is named ops.txt. We’ll show both formats here.

ops.json

[
  {
    "uuid": "UUID-goes-here",
    "name": "xadmin",
    "level": 4
  },
  {
    "uuid": "UUID-goes-here",
    "name": "Xgamingserver02",
    "level": 4
  }
]

Step 3 To set a user as admin, simply add their username to a new line, save the file, and restart your server.

Step 3 Restart your server

This will grant immediate admin access to the players you add, including access to all plugins.

Method 2 Add a Minecraft server Admin Using op username command

This can be done in two ways

Step 1 Login to the dedicatedminecraft control panel.

Step 2 Select the Minecraft server that you want to add admin on and you’ll be met with a console window.

Step 3 You’ll see the type command on the console and type op username and enter change the username to the username you’d like to make admin.

This command will grant immediate admin access to the players you add, including access to all plugins (unless otherwise configured), you will not need to restart server.

Customize admin permissions with permission plugin

All operators will have the same level of access to the server – you should install a permissions plugin to designate different access levels for your admins. Will require you to install a permissions plugin to designate different access levels for your admins.GroupManager or PermissionsEX

useful Minecraft Server admin commands

CommandPurposeCondition
ban <playername> [reason]Blacklists the name playername from the server so that they can no longer connect. Note: Bans supersede any whitelisting in place.Always succeeds.
ban-ip <ip-address \| playername>Blacklists an IP address so that all subsequent connections from it are rejected.ip-address must be valid orplayername must be online.
banlist [ips]Displays the banlist. To display banned IP addresses, use the command “banlist ips”Always succeeds.
deop <playername>Revokes a player’s operator status.Always succeeds.
kick <playername> [reason]Forcibly disconnects playername from the server, displaying an optionalreason to them.Playername must be online.
listShows the names of all currently-connected players (the same can be achieved when pressing tab)Always succeeds, even in a command block.
op <playername>Grants playername operator status on the server.Always succeeds
pardon <playername>Removes playername from the blacklist, allowing them to connect again.Always succeeds
pardon >Removes ip-address from the IP blacklist, allowing players from that IP address to connect to the server.ip-address must be valid.
save-allForces the server to write all pending changes to the world to disk.Always succeeds
save-offDisables the server writing to the world files. All changes will temporarily be queued.Always succeeds
save-onEnables the server writing to the world files. This is the default behavior.Always succeeds
stopGracefully shuts down the server.Always succeeds
whitelist <add \| remove> <playername>Adds or removes playername from the whitelist.Always succeeds
whitelist listDisplays all players in the whitelist.Always succeeds
whitelist <on \| off>Enables/disables the server’s use of a whitelist. Note: Server ops will always be able to connect when the whitelist is active, even if their names do not appear in the whitelist.Always succeeds
whitelist reloadReloads the list of playernames in white-list.txt from disk (used when white-list.txt has been modified outside of Minecraft).Always succeeds

For more Minecraft Commands visit here.

2 comments