Skip to main content

Prerequisites

  • Java development environment
  • Maven/Gradle
  • Your Minecraft server project
  • SunLicense API credentials

Integration steps

1. Add dependencies

Add this to your pom.xml:

2. Create a license validator

3. Validate on server startup

Best practices

  1. Startup validation
    • Validate the license before server initialization
    • Implement graceful shutdown on validation failure
    • Log validation status
  2. Regular validation
    • Implement periodic checks
    • Handle network issues gracefully
    • Cache validation results
  3. Error handling
    • Clear error messages
    • Proper logging
    • Graceful shutdown procedures

Troubleshooting

  1. Startup failures
    • Check license key validity
    • Verify network connectivity
    • Confirm the product ID
  2. Runtime issues
    • Monitor validation logs
    • Check for network problems
    • Verify the license hasn’t expired