<<<<<<< HEAD # mvn_MCMANAGE manage mc servers with java ======= # Enhanced Minecraft Server Manager A comprehensive Java Swing application for managing Minecraft Paper servers with automatic JAR downloading, server launching, and console management. ## Features - **Server Management**: Create and manage multiple Minecraft server instances - **Paper Integration**: Fetch and download Paper versions automatically from the official API - **JAR Management**: Automatic downloading of Paper JAR files with latest builds - **Server Launching**: Start servers with custom RAM allocation and port configuration - **Console Integration**: Real-time server console output and command input - **EULA Handling**: Automatic EULA acceptance and server.properties generation - **Persistent Storage**: JSON-based configuration saving in the root directory - **Multi-Server Support**: Manage multiple servers simultaneously ## Requirements - Java 11 or higher - Maven 3.6 or higher - Internet connection (for JAR downloads) ## Building the Project ```bash mvn clean compile ``` ## Running the Application ### Option 1: Using Maven ```bash mvn exec:java ``` ### Option 2: Using JAR file ```bash mvn clean package java -jar target/minecraft-server-manager-1.0-SNAPSHOT.jar ``` ## Usage Guide ### 1. Creating a Server 1. **Fetch Versions**: Click "Fetch Paper Versions" to load available Paper versions 2. **Add Server**: Fill in the server details: - **Name**: Server instance name - **Port**: Server port (default: 25565) - **RAM**: Memory allocation in GB - **Version**: Select a Paper version from the dropdown 3. **Save**: Click "Save Servers" to persist your configuration ### 2. Setting Up a Server 1. **Select Server**: Choose a server from the list 2. **Download JAR**: Click "Download JAR" to fetch the Paper server JAR 3. **Automatic Setup**: The system will: - Create server directory structure - Generate `eula.txt` (automatically accepted) - Create `server.properties` with your port - Copy the JAR to the server directory ### 3. Running a Server 1. **Select Server**: Choose the server you want to start 2. **Start Server**: Click "Start Server" to launch the Minecraft server 3. **Monitor Console**: Watch real-time output in the console area 4. **Send Commands**: Use the command field to send server commands 5. **Stop Server**: Click "Stop Server" to shut down the server ## Project Structure - `Main.java` - Application entry point - `EnhancedServerManagerUI.java` - Main GUI interface with server management - `ServerManager.java` - Core server management and JAR downloading logic - `ServerLocation.java` - Legacy server location model - `JSONManager.java` - JSON persistence utilities - `PaperAPIClient.java` - API client for fetching Paper versions ## Directory Structure ``` minecraft-server-manager/ ├── servers.json # Legacy server locations ├── server_instances.json # Enhanced server configurations ├── servers/ # Server instance directories │ ├── server1/ │ │ ├── paper-1.20.1-123.jar │ │ ├── eula.txt │ │ ├── server.properties │ │ └── world/ │ └── server2/ └── jars/ # Downloaded JAR files ├── paper-1.20.1-123.jar └── paper-1.21.1-456.jar ``` ## Server Configuration ### Automatic Files Generated - **eula.txt**: Automatically set to `eula=true` - **server.properties**: Basic configuration with your specified port - **JAR files**: Downloaded from Paper API with latest builds ### Memory Configuration - **Xmx**: Maximum heap size (RAM GB × 1024 MB) - **Xms**: Initial heap size (RAM GB × 512 MB) ## API Integration The application integrates with the official Paper API: - **Versions**: Fetches available Paper versions - **Builds**: Downloads latest builds for selected versions - **JARs**: Automatic JAR file management ## Troubleshooting ### Common Issues 1. **Port Already in Use**: Change the port number in server configuration 2. **Insufficient Memory**: Reduce RAM allocation or close other applications 3. **JAR Download Fails**: Check internet connection and try again 4. **Server Won't Start**: Check console output for specific error messages ### Console Commands Use the command field to send server commands: - `stop` - Stop the server gracefully - `save-all` - Save all worlds - `list` - List online players - `op ` - Give operator status - `whitelist add ` - Add player to whitelist ## Data Storage - **Server Configurations**: Stored in `server_instances.json` in the root directory - **Server Files**: Each server has its own directory under `servers/` - **JAR Files**: Cached in `jars/` directory to avoid re-downloading >>>>>>> df9ed6a (first shit)