Skip to content

Commit

Permalink
merge and fix custom command not being shown
Browse files Browse the repository at this point in the history
  • Loading branch information
seliayeu committed Aug 25, 2024
2 parents 5ca781f + 0a1c26d commit 998218d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion core/src/implementations/minecraft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ impl MinecraftInstance {
cmd_args_config_map.insert(max_ram.get_identifier().to_owned(), max_ram.into());
let java_cmd = CmdArgSetting::JavaCmd(java_cmd);
cmd_args_config_map.insert(java_cmd.get_identifier().to_owned(), java_cmd.into());
let custom_cmd = CmdArgSetting::CustomCmd(String::new());
let custom_cmd =
CmdArgSetting::CustomCmd(restore_config.custom_cmd.clone().unwrap_or(String::new()));
cmd_args_config_map.insert(custom_cmd.get_identifier().to_owned(), custom_cmd.into());

let cmd_line_section_manifest = SectionManifest::new(
Expand Down
8 changes: 4 additions & 4 deletions core/src/implementations/minecraft/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ use crate::traits::t_macro::TaskEntry;
use crate::traits::t_server::{MonitorReport, State, StateAction, TServer};

use crate::types::Snowflake;
use crate::util::{dont_spawn_terminal, list_dir};
use crate::util::dont_spawn_terminal;

use super::r#macro::resolve_macro_invocation;
use super::util::create_java_launch_cmd;
use super::{Flavour, ForgeBuildVersion, MinecraftInstance};
use super::MinecraftInstance;
use tracing::{error, info, warn};

#[async_trait::async_trait]
Expand Down Expand Up @@ -136,9 +136,9 @@ impl TServer for MinecraftInstance {
server_start_command
};

let server_start_command = server_start_command.current_dir(&self.path_to_instance);
server_start_command.current_dir(&self.path_to_instance);

match dont_spawn_terminal(server_start_command)
match dont_spawn_terminal(&mut server_start_command)
.stdout(Stdio::piped())
.stdin(Stdio::piped())
.stderr(Stdio::piped())
Expand Down
1 change: 0 additions & 1 deletion core/src/implementations/minecraft/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ pub async fn create_java_launch_cmd(
};

server_start_command.arg("nogui");
println!("{:?}", server_start_command);

Ok(server_start_command)
}
Expand Down

0 comments on commit 998218d

Please sign in to comment.