# FPP AutoAuth Extension
**Author**: FPP
**Version**: 1.0.0
An extension for FakePlayerPlugin (FPP) that automatically handles authentication for fake players.
## Features
- **🔐 Auto-Register**: Automatically runs `/register <password>` for new bots
- **🔑 Auto-Login**: Automatically runs `/login <password>` for returning bots
- **💾 Local Database**: Stores bot credentials in SQLite database
- **🎯 Smart Detection**: Detects popular auth plugins (AuthMe, RegisterPlus, etc.)
## Installation
1. Copy JAR to FPP extensions folder:
```
plugins/FakePlayerPlugin/extensions/FppAutoAuth-1.0.0.jar
```
2. Restart server or run `/fpp reload`
3. Configure password in `plugins/FakePlayerPlugin/extensions/FppAutoAuth/config.yml`:
```yaml
register-password: "112200"
```
## How It Works
### First Spawn (New Bot)
```
[FPP] god registered
```
Bot is registered and credentials saved to database.
### Subsequent Spawns (Returning Bot)
```
[FPP] god logged in
```
Bot automatically logs in using stored password.
## Database
**Location**: `plugins/FakePlayerPlugin/extensions/FppAutoAuth/data/bots.db`
**Schema**:
- `bot_name` - Bot's name (primary key)
- `bot_uuid` - Bot's UUID
- `password` - Stored password
- `first_registered` - Registration timestamp
- `last_login` - Last login timestamp
## Commands
### Manual Register/Login
```
/fpp register
```
Triggers register or login for the current player.
### Database Status
```
/fpp botdb
```
Shows database status and bot count (requires permission: `fppaut auth.admin`)
## Configuration
Edit `plugins/FakePlayerPlugin/extensions/FppAutoAuth/config.yml`:
```yaml
# Password for all bot registrations
register-password: "defaultPassword"
# Use /register <pass> <pass> format (for plugins requiring confirmation)
use-confirm-password: false
# Delay before executing command (20 ticks = 1 second)
registration-delay-ticks: 20
```
## Supported Auth Plugins
- AuthMe
- LogIn
- LoginSecurity
- FastLogin
- BCrypt
- PremiumVanish
- RegisterPlus
## Console Output
**Clean, minimal logging**:
```
[FPP] AutoAuth enabled
[FPP] Database initialized (2 bots)
[FPP] god registered
[FPP] Atlas76 logged in
```
## Build from Source
```bash
cd register-extension
./gradlew clean jar
```
Output: `build/libs/FppAutoAuth-1.0.0.jar`
## Requirements
- FakePlayerPlugin (FPP)
- Java 21
- Paper/Spigot 1.21+
## License
This extension is provided as-is for use with FakePlayerPlugin.
## Author
**FPP** - FakePlayerPlugin Development Team
## Support
For issues or questions, join the FPP Discord or check the wiki at https://fpp.wtf