
MinecraftREST
MinecraftREST, a powerful REST API interface for Minecraft servers that provides secure endpoints for server management and player interactions.
- Загрузки
- 104
- Подписчики
- 1
- Обновлён
- 16 марта 2025 г.
- Лицензия
- MIT
Опубликован 16 марта 2025 г.
MinecraftREST
The first stable release of MinecraftREST, a powerful REST API interface for Minecraft servers that provides secure endpoints for server management and player interactions.
🚀 Features
- 🔒 Secure JWT Authentication
- 🌐 RESTful API endpoints for server management
- 👥 Player management (kick, gamemode, messaging)
- 📊 Server information and statistics
- ⚡ Rate limiting protection
- 🔍 Real-time player and world data
📋 Requirements
- Java 17 or higher
- Spigot/Paper server 1.20.4
🔧 Installation
- Download the
minecraft-rest-1.0.0.jarfrom this release - Place it in your server's
pluginsfolder - Start/restart your server
- Configure the plugin in
plugins/MinecraftREST/config.yml
Configuration
The plugin creates a config.yml file in plugins/MinecraftREST/ with the following options:
# API Configuration
api-port: 4567 # The port on which the HTTP API will run
# Security Configuration
security:
jwt-secret: "your-secret-key-here" # Change this to a secure random string
max-requests-per-minute: 60 # Rate limiting threshold
admin-credentials:
username: "admin" # Change this to a secure username
password: "change-this-password" # Change this to a secure password
⚠️ Important: Change the default security settings before using in production!
API Documentation
The API is documented using the OpenAPI (Swagger) specification. You can find the full API documentation in:
api-docs/swagger.yaml- OpenAPI 3.0 specification file- Import this file into tools like:
Quick API Overview
All endpoints except /api/auth/login require JWT authentication via Bearer token.
Authentication
POST /api/auth/login- Get JWT token
Server Management
GET /api/server/info- Get server informationPOST /api/server/command- Execute console commandPOST /api/broadcast- Broadcast message
Player Management
GET /api/players- List online playersPOST /api/player/message- Send message to playerPOST /api/player/kick- Kick playerPOST /api/player/gamemode- Change player gamemode
Ченджлог
1.0.1Релиз1.20.4, 1.20.5, 1.20.6 · 16 марта 2025 г.
MinecraftREST 1.0.1
Bug Fixes 🐛
- Fixed an error that occurs because trying to kick a player from an asynchronous thread (the HTTP request thread) while Bukkit/Spigot requires player operations to be performed on the main server thread.
- Fixed similar thread safety issues with the gamemode change endpoint.
- Both operations now properly run on the main server thread using BukkitRunnable.
Technical Details 🔧
- Modified
/api/player/kickendpoint to use Bukkit's scheduler - Modified
/api/player/gamemodeendpoint to use Bukkit's scheduler - Improved error handling for async operations
- Follows the same pattern as the command execution endpoint for thread safety
Developer Notes 📝
- If you're using these endpoints in your code, no changes are required on your end
- The API interface and responses remain the same
- Operations may take a few milliseconds longer due to thread scheduling
Installation
- Download the
minecraft-rest-1.0.1.jarfrom this release - Place it in your server's
pluginsfolder - Start/restart your server
- Configure the plugin in
plugins/MinecraftREST/config.yml
Important Security Reminder ⚠️
Remember to change the default security settings in config.yml:
- Change the JWT secret
- Update admin credentials
- Consider using HTTPS in production
Documentation
Full documentation is available in:
- README.md in the repository
- api-docs/swagger.yaml for API specification
1.0.0Релиз1.20.4, 1.20.5, 1.20.6 · 16 марта 2025 г.
Changelog
[1.0.0] - 2024-03-20 - Initial Release 🚀
Added
- Complete RESTful API implementation for Minecraft server management
- Secure JWT authentication system
- Rate limiting protection (configurable requests per minute)
- Comprehensive error handling and logging
API Endpoints
Authentication
- POST /api/auth/login - Secure login endpoint with JWT token generation
Server Management
- GET /api/server/info - Server status and information
- POST /api/server/command - Remote console command execution
- POST /api/broadcast - Server-wide message broadcasting
Player Management
- GET /api/players - Online player listing with detailed information
- POST /api/player/message - Individual player messaging
- POST /api/player/kick - Player removal management
- POST /api/player/gamemode - Player gamemode control
Security Features
- JWT-based authentication system
- Configurable rate limiting
- Secure password hashing with BCrypt
- Request validation and sanitization
- Customizable admin credentials
Configuration
- Flexible config.yml system
- Configurable API port
- Customizable JWT secret
- Adjustable rate limiting
- Admin credential management
Documentation
- Comprehensive README documentation
- API endpoint documentation
- Security best practices guide
- Installation and configuration instructions
Technical Details
- Built for Spigot/Paper 1.20.4
- Java 17 compatibility
- Maven-based build system
- MIT License
Note: This is the initial release of MinecraftREST. Future versions will build upon this foundation based on community feedback and needs.
Комментарии
Загружаем…