From a5fc77749fa5665d2bad2137d1b347e5252ee3a2 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 11 Dec 2017 19:40:02 +0000 Subject: [PATCH] Added -file (-f) option to start.ps1 This allows specifying a PocketMine-MP PHP file to execute (phar or source) to use to run the server, like start.sh. If not specified, auto-detection is used. --- start.ps1 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/start.ps1 b/start.ps1 index b7f1890ab..37b530e7f 100644 --- a/start.ps1 +++ b/start.ps1 @@ -2,6 +2,7 @@ param ( [string]$php = "", [switch]$Loop = $false, + [string]$file = "", [string][Parameter(ValueFromRemainingArguments)]$extraPocketMineArgs ) @@ -14,14 +15,16 @@ if($php -ne ""){ $binary = "php" } -if(Test-Path "PocketMine-MP.phar"){ - $file = "PocketMine-MP.phar" -}elseif(Test-Path "src\pocketmine\PocketMine.php"){ - $file = "src\pocketmine\PocketMine.php" -}else{ - echo "Couldn't find a valid PocketMine-MP installation" - pause - exit 1 +if($file -eq ""){ + if(Test-Path "PocketMine-MP.phar"){ + $file = "PocketMine-MP.phar" + }elseif(Test-Path "src\pocketmine\PocketMine.php"){ + $file = "src\pocketmine\PocketMine.php" + }else{ + echo "Couldn't find a valid PocketMine-MP installation" + pause + exit 1 + } } function StartServer{