Home›Java›Mods›ServerProtect
ModsJava

ServerProtect

Java mod listed for Minecraft 1.21. Downloads from the MC Java Mods app on Android.

by DrMinified · on Modrinth

⬇ Download on Modrinth

ServerProtect

A lightweight Velocity proxy protection plugin for blocking usernames before they can connect to your network.

Features

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
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more