How to ban, kick and unban a player
You can type every command below in the panel console (without /) or in game if you have OP (with /).
Kicking a player
kick Nick Reason
The player can come back straight away. Good as a first warning.
Banning a name
ban Nick Reason
The player cannot join until you unban them. Banned players are stored in banned-players.json.
IP ban
ban-ip Nick
This blocks the player's IP address, so they cannot join with another account from the same internet connection either. Be careful: you might also block a sibling or players on the same network.
Unbanning
pardon Nick
pardon-ip 1.2.3.4
Type banlist to see the list of bans.
Temporary bans
Vanilla commands have no timed bans. For that, install a plugin such as LiteBans or AdvancedBan. You get commands like /tempban Nick 7d Reason, a punishment history and mutes.
Frequently asked questions
I unbanned a player but they still cannot join.
Check for an IP ban as well (banlist ips), and whether a ban plugin is blocking them. In that case, unban them with that plugin's command.
How do I give a moderator only kick and ban, without full OP?
Use the LuckPerms plugin. It is explained in the guide on ranks and permissions.
Pepe