Prerequisites
- Java development environment
- Maven/Gradle
- Your Minecraft server project
- SunLicense API credentials
Integration steps
1. Add dependencies
Add this to yourpom.xml:
2. Create a license validator
3. Validate on server startup
Best practices
- Startup validation
- Validate the license before server initialization
- Implement graceful shutdown on validation failure
- Log validation status
- Regular validation
- Implement periodic checks
- Handle network issues gracefully
- Cache validation results
- Error handling
- Clear error messages
- Proper logging
- Graceful shutdown procedures
Troubleshooting
- Startup failures
- Check license key validity
- Verify network connectivity
- Confirm the product ID
- Runtime issues
- Monitor validation logs
- Check for network problems
- Verify the license hasn’t expired