You remove players with commands – either in the console of your server or in the game chat. PocketMine-MP distinguishes between name bans and IP bans.
Kick a player
/kick <PlayerName> [reason]
The player is disconnected from the server immediately but can rejoin at any time. The optional reason is shown to them.
Ban a player
/ban <PlayerName> [reason]
The player can no longer connect. If they are online at that moment, they are kicked from the server immediately.
Ban an IP address
/ban-ip <IP address or player name> [reason]
If you provide an IP address, that address is banned directly. If you provide the name of a player who is currently online instead, the server bans their current IP address.
Show bans
/banlist [ips|players]
Without an argument the command shows the banned player names – exactly like players does. Banned IP addresses are only shown with ips.
Lift a ban
/pardon <PlayerName>
/pardon-ip <IP address>
Command overview
| Command | Description |
|---|---|
/kick <PlayerName> [reason] |
Disconnects a player from the server |
/ban <PlayerName> [reason] |
Bans a player name permanently |
/ban-ip <IP or name> [reason] |
Bans an IP address |
/pardon <PlayerName> |
Lifts the ban of a player name (also /unban) |
/pardon-ip <IP address> |
Lifts the ban of an IP address (also /unban-ip) |
/banlist [ips|players] |
Shows the banned player names, with ips the banned IP addresses |
The ban lists as files
All bans are stored in two text files in the main folder of your server:
| File | Content |
|---|---|
banned-players.txt |
Banned player names |
banned-ips.txt |
Banned IP addresses |
Every line in banned-players.txt follows this pattern, separated by a vertical bar:
Name|Created|Created by|Expires|Reason
Whitelist instead of a ban list
If you want to open your server only to specific players instead of banning individual ones, use the whitelist.
-
Enable the whitelist
Enter the following command:/whitelist on -
Allow players
Add every allowed player individually:/whitelist add <PlayerName> -
Check the list
Display all allowed players:/whitelist list
| Command | Description |
|---|---|
/whitelist on |
Enables the whitelist |
/whitelist off |
Disables the whitelist |
/whitelist add <PlayerName> |
Adds a player |
/whitelist remove <PlayerName> |
Removes a player |
/whitelist list |
Shows all allowed players |
/whitelist reload |
Reloads the whitelist |
