diff --git a/bin/run-bl b/bin/run-bl index 1b52f13..7b9bb9e 100644 --- a/bin/run-bl +++ b/bin/run-bl @@ -15,7 +15,6 @@ fi # Required vars [ -z "$BL_PORT" ] && echo "Missing BL_PORT" && exit 1 [ -z "$BL_GAMEMODE" ] && echo "Missing BL_GAMEMODE" && exit 1 -[ -z "$BL_SERVER_NAME" ] && echo "Missing BL_SERVER_NAME" && exit 1 if [[ "$BL_DEDI_LAN" == "1" ]]; then dedi="dedicatedLAN" @@ -82,12 +81,18 @@ fi echo "Launching Blockland..." +server_name_args=() +[ -n "$BL_SERVER_NAME" ] && server_name_args=(-serverName "$BL_SERVER_NAME") + +max_players_args=() +[ -n "$BL_MAX_PLAYERS" ] && max_players_args=(-maxPlayers "$BL_MAX_PLAYERS") + exec xvfb-run -a wine "Blockland.exe" \ ptlaaxobimwroe \ -${dedi} \ -port "$BL_PORT" \ -dtoken "$BL_DTOKEN" \ -gamemode "$BL_GAMEMODE" \ - -serverName "$BL_SERVER_NAME" \ - -maxPlayers "$BL_MAX_PLAYERS" \ + "${server_name_args[@]}" \ + "${max_players_args[@]}" \ $BL_EXTRA_ARGS \ No newline at end of file