# ProtectCord - Folia Edition
## Platform Information
**Compatible with:** Folia 1.19+
**Java Version:** Java 17+
**Server Type:** Bukkit-based server plugin (Paper fork with regionalized multithreading)
---
## What This Plugin Does
ProtectCord for Folia provides real-time IP protection for your Minecraft server by checking every connecting player against our threat intelligence database. Specially designed to work with Folia's unique regionalized multithreading system.
### Key Features
✅ **Folia-Compatible** - Built specifically for Folia's threading model
✅ **Region-Safe** - All IP checks are fully async and won't block region threads
✅ **VPN/Proxy Detection** - Automatically blocks VPN and proxy connections
✅ **Risk Assessment** - AI-powered threat scoring from UNKNOWN to CRITICAL
✅ **Smart Whitelist** - Bypass protection for trusted players, UUIDs, or IPs
✅ **Discord Alerts** - Real-time webhook notifications when players are blocked
✅ **High Performance** - Optimized for Folia's multi-region architecture
### How It Works
1. **Player Connects** → IP is captured during async login event
2. **Background Check** → IP is checked against ProtectCord API (region-safe async)
3. **Decision Made** → Allow or block based on VPN/Proxy/Risk level
4. **Action Taken** → Player joins or sees custom kick message
5. **Notification** → Optional Discord webhook alert
### Automatic Bypasses
The plugin intelligently bypasses checking for:
- **Localhost** (`127.0.0.1`, `::1`)
- **Private Networks** (`192.168.x.x`, `10.x.x.x`, `172.16-31.x.x`)
- **Whitelisted Players** (configured via commands)
---
## Why Use Folia Edition?
### Perfect For:
- 🚀 **High-Performance Servers** - Optimized for Folia's regionalized multithreading
- 🌍 **Large Worlds** - Works seamlessly with Folia's multi-region system
- ⚡ **Maximum TPS** - Won't interfere with Folia's performance improvements
- 🎮 **Survival Servers** - Ideal for large survival/SMP servers on Folia
### When to Choose Folia Edition:
- Running Folia 1.19+ (Paper fork)
- Using regionalized multithreading for performance
- Need thread-safe IP protection
- Have Java 17+ available
### What Makes It Special:
Unlike traditional plugins, Folia Edition is designed from the ground up to respect Folia's threading model:
- ✅ No region thread blocking
- ✅ All API calls are fully async
- ✅ Thread-safe whitelist management
- ✅ Compatible with Folia's unique scheduler
---
## Configuration
Located at: `plugins/ProtectCord/config.yml`
```yaml
api-key: "YOUR_API_KEY_HERE"
# Block settings
enable-ip-check: true
block-vpn: true
block-proxy: true
block-datacenter: false
block-bogon: true
blocked-risk-level: "HIGH"
# Discord webhooks (optional)
discord-webhook:
enabled: false
url: ""
events:
denied: true
accepted: false
whitelisted: true
error: true
```
---
## Commands
| Command | Description |
|---------|-------------|
| `/protectcord reload` | Reload configuration |
| `/protectcord stats` | View API usage stats |
| `/protectcord check <player\|ip>` | Manually check an IP |
| `/protectcord whitelist add player <name>` | Whitelist a player |
| `/protectcord whitelist add uuid <uuid>` | Whitelist a UUID |
| `/protectcord whitelist add ip <ip>` | Whitelist an IP |
| `/protectcord list` | View all whitelisted entries |
**Aliases:** `/pc`, `/protect`
---
## Permissions
| Permission | Description | Default |
|------------|-------------|---------|
| `protectcord.admin` | Access to all commands | OP |
---
## Installation
1. Download `ProtectCord-Folia-1.0.0.jar`
2. Drop into your server's `plugins/` folder
3. Start or restart your server
4. Get a free API key from [protectcord.com](https://protectcord.com)
5. Add your API key to `plugins/ProtectCord/config.yml`
6. Run `/protectcord reload` or restart again
7. Done! Your server is protected ✅
---
## Performance
- **Region-Safe** - Never blocks region threads
- **Fully Async** - All IP checks run in background
- **Zero TPS Impact** - Works with Folia's threading model
- **Ultra Fast** - Most API calls complete in <100ms
- **Folia-Optimized** - Designed for regionalized multithreading
---
## Folia-Specific Notes
This edition has been specifically adapted for Folia's architecture:
- ✅ Uses Folia-compatible async task scheduler
- ✅ No synchronous operations on region threads
- ✅ Thread-safe configuration and whitelist management
- ✅ Compatible with multi-region world splitting
- ✅ Tested on Folia 1.19+ builds
---
## Support
- 💬 **Discord:** [protectcord.com/discord](https://protectcord.com/discord)
- 🐛 **Bug Reports:** Submit an issue in our discord!
- 📖 **Documentation:** [api.protectcord.com](https://api.protectcord.com)
---
## Changelog
### Version 1.0.0 (Initial Release)
- ✅ Real-time IP verification via ProtectCord API
- ✅ VPN, Proxy, and Datacenter detection
- ✅ Risk-based blocking system (UNKNOWN to CRITICAL)
- ✅ Player/UUID/IP whitelist system
- ✅ Discord webhook integration
- ✅ Configurable kick messages
- ✅ API usage statistics command
- ✅ Auto-update checker
- ✅ bStats integration
- ✅ Full Folia compatibility (1.19+)
- ✅ Region-safe async operations
- ✅ Thread-safe implementation
---
**ProtectCord Folia Edition - High-performance protection for regionalized multithreaded servers**
*Made with ❤️ for the Minecraft community*
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }