Compatibility
Minecraft: Java Edition
1.21.11
Platforms
Tags
Creators
Details
ServerProtect
A lightweight Velocity proxy protection plugin for blocking usernames before they can connect to your network.
Features
- š« Block players by username
- š Blocks players before login
- š¤ Case-insensitive username matching
- šØ MiniMessage support
- āļø Configurable kick message
- š Reload configuration without restarting Velocity
- š Automatic
blocked.txtmanagement - š» Console-only management commands
- š View all blocked usernames
- ā Ban usernames directly from the Velocity console
- ā Unban usernames directly from the Velocity console
- ā” Lightweight and dependency-free
Commands
All commands are console-only.
| Command | Description |
|---|---|
/sp ban <username> |
Ban a username |
/sp unban <username> |
Remove a username from the ban list |
/sp list |
List all banned usernames |
/sp reload |
Reload config.toml and blocked.txt |
/sp help |
Show available commands |
/serverprotect can also be used instead of /sp.
Configuration
After the first startup, ServerProtect creates:
plugins/
āāā serverprotect/
āāā config.toml
āāā blocked.txt
config.toml
The kick message uses MiniMessage.
You can use MiniMessage tags such as:
<red>
<green>
<blue>
<gray>
<dark_red>
<bold>
<italic>
<underlined>
<gradient:red:dark_red>
<newline>
blocked.txt
Add one username per line:
# One username per line
Player123
BadPlayer
ExampleUser
Username matching is case-insensitive.
For example, banning:
Player123
also blocks:
player123
PLAYER123
pLaYeR123
How It Works
When a player attempts to connect:
Player
ā
ā¼
Velocity PreLoginEvent
ā
ā¼
Check blocked.txt
ā
āāā Not blocked āāāŗ Continue login
ā
āāā Blocked āāāāāāāŗ Kick with MiniMessage
Because the check happens during PreLoginEvent, the player is rejected by the Velocity proxy before reaching a backend server.
Example
Ban a player:
/sp ban ExamplePlayer
Output:
Banned ExamplePlayer.
Check the list:
/sp list
Unban:
/sp unban ExamplePlayer
Reload after manually editing the files:
/sp reload

