mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-19 01:16:38 +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
19
start.ps1
19
start.ps1
@ -2,6 +2,7 @@
|
|||||||
param (
|
param (
|
||||||
[string]$php = "",
|
[string]$php = "",
|
||||||
[switch]$Loop = $false,
|
[switch]$Loop = $false,
|
||||||
|
[string]$file = "",
|
||||||
[string][Parameter(ValueFromRemainingArguments)]$extraPocketMineArgs
|
[string][Parameter(ValueFromRemainingArguments)]$extraPocketMineArgs
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,14 +15,16 @@ if($php -ne ""){
|
|||||||
$binary = "php"
|
$binary = "php"
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Test-Path "PocketMine-MP.phar"){
|
if($file -eq ""){
|
||||||
$file = "PocketMine-MP.phar"
|
if(Test-Path "PocketMine-MP.phar"){
|
||||||
}elseif(Test-Path "src\pocketmine\PocketMine.php"){
|
$file = "PocketMine-MP.phar"
|
||||||
$file = "src\pocketmine\PocketMine.php"
|
}elseif(Test-Path "src\pocketmine\PocketMine.php"){
|
||||||
}else{
|
$file = "src\pocketmine\PocketMine.php"
|
||||||
echo "Couldn't find a valid PocketMine-MP installation"
|
}else{
|
||||||
pause
|
echo "Couldn't find a valid PocketMine-MP installation"
|
||||||
exit 1
|
pause
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function StartServer{
|
function StartServer{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user