mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +00:00
Added .BAT for async command I/O in one window
This commit is contained in:
parent
adb795be22
commit
0086900469
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,7 +1,6 @@
|
|||||||
data/players/*
|
data/players/*
|
||||||
data/maps/*
|
data/maps/*
|
||||||
*.log
|
*.log
|
||||||
*.bat
|
|
||||||
server.properties
|
server.properties
|
||||||
white-list.txt
|
white-list.txt
|
||||||
banned-ips.txt
|
banned-ips.txt
|
||||||
|
@ -27,5 +27,9 @@ the Free Software Foundation, either version 3 of the License, or
|
|||||||
|
|
||||||
$fp = fopen(dirname(__FILE__)."/console.in","wb");
|
$fp = fopen(dirname(__FILE__)."/console.in","wb");
|
||||||
while(true){
|
while(true){
|
||||||
echo "/";fwrite($fp, fgets(STDIN));
|
$l = fgets(STDIN);
|
||||||
|
fwrite($fp, $l);
|
||||||
|
if(strtolower(trim($l)) === "stop" and isset($argv[1]) and trim($argv[1]) == "1"){
|
||||||
|
sleep(5);die();
|
||||||
|
}
|
||||||
}
|
}
|
29
start.bat
Normal file
29
start.bat
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
@echo off
|
||||||
|
TITLE Pocket-Minecraft-PHP Server - by @shoghicp
|
||||||
|
echo.
|
||||||
|
echo -
|
||||||
|
echo / \
|
||||||
|
echo / \
|
||||||
|
echo / POCKET \
|
||||||
|
echo / MINECRAFT PHP \
|
||||||
|
echo ^|\ @shoghicp /^|
|
||||||
|
echo ^|. \ / .^|
|
||||||
|
echo ^| .. \ / .. ^|
|
||||||
|
echo ^| .. ^| .. ^|
|
||||||
|
echo ^| .. ^| .. ^|
|
||||||
|
echo \ ^| /
|
||||||
|
echo \ ^| /
|
||||||
|
echo \ ^| /
|
||||||
|
echo \ ^| /
|
||||||
|
echo.
|
||||||
|
echo.
|
||||||
|
FOR /F "tokens=*" %%i in ('php.exe -r "echo 1;"') do SET PHPOUTPUT=%%i
|
||||||
|
if not %PHPOUTPUT%==1 (
|
||||||
|
echo [ERROR] Couldn't find PHP in PATH.
|
||||||
|
pause
|
||||||
|
exit
|
||||||
|
)
|
||||||
|
START /B CMD /C CALL php server.php
|
||||||
|
START /B /WAIT php input.php 1
|
||||||
|
pause
|
||||||
|
exit
|
Loading…
x
Reference in New Issue
Block a user