mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-18 17:11:28 +00:00
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.
This commit is contained in:
parent
98cb7f2e10
commit
a5fc77749f
@ -2,6 +2,7 @@
|
||||
param (
|
||||
[string]$php = "",
|
||||
[switch]$Loop = $false,
|
||||
[string]$file = "",
|
||||
[string][Parameter(ValueFromRemainingArguments)]$extraPocketMineArgs
|
||||
)
|
||||
|
||||
@ -14,6 +15,7 @@ if($php -ne ""){
|
||||
$binary = "php"
|
||||
}
|
||||
|
||||
if($file -eq ""){
|
||||
if(Test-Path "PocketMine-MP.phar"){
|
||||
$file = "PocketMine-MP.phar"
|
||||
}elseif(Test-Path "src\pocketmine\PocketMine.php"){
|
||||
@ -23,6 +25,7 @@ if(Test-Path "PocketMine-MP.phar"){
|
||||
pause
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
function StartServer{
|
||||
$command = "powershell " + $binary + " " + $file + " " + $extraPocketMineArgs
|
||||
|
Loading…
x
Reference in New Issue
Block a user