In PocketMine-MP admin rights are called operator rights (short: "OP"). They are granted with the op command. What you enter is the player's Minecraft or Xbox player name – not a UUID and not an XUID.
Add an admin via the console
This is the usual way if you do not have operator rights yourself yet.
-
Open the console
Open the dashboard of your server and switch to the console. -
Enter the command
Enter the following command with the player name:op <PlayerName> -
Wait for the confirmation
The server confirms the change. If the player is online at that moment, they receive their operator rights immediately.
Add an admin in the game
-
Join the server
Connect to your server. -
Open the chat
Open the chat with the key matching your device or through the chat icon. -
Enter the command
Enter the following command:/op <PlayerName>
Remove admin rights
/deop <PlayerName>
This removes the player's operator rights again and takes them out of ops.txt.
Command overview
| Command | Description |
|---|---|
/op <PlayerName> |
Gives the specified player operator status |
/deop <PlayerName> |
Takes the specified player's operator status |
Edit ops.txt directly
Alternatively you can edit the file yourself.
-
Stop the server
Stop your server via the dashboard. -
Connect via SFTP
Connect to your server via SFTP or use the file browser in the dashboard. -
Open ops.txt
In the main folder of your server, open the file:ops.txt -
Enter the player names
Enter exactly one player name per line:steve alex -
Start the server
Save the file and start your server.
Fine-grained permissions
Operators receive all admin permissions in one bundle through the permission group pocketmine.group.operator, for example the pocketmine.command.op.give permission for granting operator rights to others.
