@@ -25,23 +25,24 @@ import (
2525
2626// MinecraftConfig represents the configuration for the Minecraft service.
2727type MinecraftConfig struct {
28- PromptPath string `json:"prompt_path,omitempty"`
29- ServerAddress string `json:"server_address" json:"server_address,omitempty"` // Address of the Minecraft server (if connecting, not starting)
30- Port int `json:"port" json:"port,omitempty"` // Port of the Minecraft server (e.g., RCON port)
31- Username string `json:"username" json:"username,omitempty"` // Username for authentication (if needed)
32- Password string `json:"password" json:"password,omitempty"` // Password for authentication (if needed)
28+ // --- Fields for connecting to an EXISTING server (e.g., via RCON - currently NOT used by StartMinecraftServer) ---
29+ PromptPath string `json:"prompt_path"` // Path to the prompt file for the Minecraft service
30+ ServerAddress string `json:"server_address"` // Address of the Minecraft server (if connecting, not starting)
31+ Port int `json:"port"` // Port of the Minecraft server (e.g., RCON port)
32+ Username string `json:"username"` // Username for authentication (if needed)
33+ Password string `json:"password"` // Password for authentication (if needed)
3334
3435 // --- Fields for STARTING a NEW local server ---
35- ServerRootPath string `json:"serverRootPath" json:"server_root_path,omitempty" ` // Path to the Minecraft server root directory
36- ServerJarFile string `json:"serverJarFile" json:"server_jar_file,omitempty"` // Name of the server JAR file (e.g., "minecraft_server.1.20.2.jar")
37- JavaPath string `json:"javaPath" json:"java_path,omitempty"` // Path to the java executable (default: "java")
38- JvmMemoryArgs string `json:"jvmMemoryArgs" json:"jvm_memory_args,omitempty"` // JVM memory arguments (e.g., "-Xms1024M -Xmx2048M")
39- ServerLogFile string `json:"serverLogFile" json:"server_log_file,omitempty"` // Path to the server log file (relative to ServerRootPath or absolute)
40- StartupTimeout int `json:"startupTimeout" json:"startup_timeout,omitempty"` // Seconds to wait for server startup (approximate)
41- ShutdownCommand string `json:"shutdownCommand" json:"shutdown_command,omitempty" ` // Command to gracefully stop the server (e.g., "stop")
36+ ServerRootPath string `json:"serverRootPath"` // Path to the Minecraft server root directory
37+ ServerJarFile string `json:"serverJarFile"` // Name of the server JAR file (e.g., "minecraft_server.1.20.2.jar")
38+ JavaPath string `json:"javaPath"` // Path to the java executable (default: "java")
39+ JvmMemoryArgs string `json:"jvmMemoryArgs"` // JVM memory arguments (e.g., "-Xms1024M -Xmx2048M")
40+ ServerLogFile string `json:"serverLogFile"` // Path to the server log file (relative to ServerRootPath or absolute)
41+ StartupTimeout int `json:"startupTimeout"` // Seconds to wait for server startup (approximate)
42+ ShutdownCommand string `json:"shutdownCommand"` // Command to gracefully stop the server (e.g., "stop")
4243
43- GameVersion string `json:"game_version" json:"game_version,omitempty"` // Informational, used in prompts
44- CommandTimeout int `json:"command_timeout" json:"command_timeout,omitempty" ` // Timeout for individual command execution (if applicable in future connection methods)
44+ GameVersion string `json:"game_version"` // Informational, used in prompts
45+ CommandTimeout int `json:"command_timeout"` // Timeout for individual command execution (if applicable in future connection methods)
4546}
4647
4748// NewMinecraftConfig creates a new MinecraftConfig with default values.
0 commit comments