From db19c68fb80b201388b02d49b54e19f08c2d3320 Mon Sep 17 00:00:00 2001 From: SVV-team <48009651+SVV-team@users.noreply.github.com> Date: Mon, 4 Nov 2019 20:33:50 +0200 Subject: [PATCH] Add fullscreen option (#29) Add fullscreen option --- README.md | 1 + components/handler.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index defe28b..782e392 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ launcher.on('data', (e) => console.log(e)); | `options.timeout` | Integer | Timeout on download requests. | False | | `options.window.width` | String | Width of the Minecraft Client | False | | `options.window.height` | String | Height of the Minecraft Client. | False | +| `options.window.fullscreen` | Boolean| Fullscreen of the Minecraft Client. | False | | `options.overrides` | Object | Json object redefining paths for better customization. Example below. | False | | `options.overrides.minArgs`| Integer| The amount of launch arguments specified in the version file before it adds the default again| False | ```js diff --git a/components/handler.js b/components/handler.js index 58bd03b..7d4808e 100644 --- a/components/handler.js +++ b/components/handler.js @@ -498,8 +498,8 @@ class Handler { args[index] = fields[args[index]]; } } - - if(this.options.window) args.push('--width', this.options.window.width, '--height', this.options.window.height); + + if(this.options.window) this.options.window.fullscreen ? args.push('--fullscreen') : args.push('--width', this.options.window.width, '--height', this.options.window.height); if(this.options.server) args.push('--server', this.options.server.host, '--port', this.options.server.port || "25565"); if(this.options.proxy) args.push( '--proxyHost',