mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Added --disable-readline CLI argument
This commit is contained in:
parent
bd721a13a3
commit
344c84cfa6
@ -71,7 +71,8 @@ class CommandReader extends Thread{
|
||||
|
||||
public function run(){
|
||||
$this->buffer = new \Threaded;
|
||||
if(extension_loaded("readline") and $this->stream === "php://stdin"){
|
||||
$opts = getopt("", ["disable-readline"]);
|
||||
if(extension_loaded("readline") and $this->stream === "php://stdin" and !isset($opts["disable-readline"])){
|
||||
$this->readline = true;
|
||||
}else{
|
||||
$this->readline = false;
|
||||
|
@ -19,15 +19,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
$server = proc_open("php src/pocketmine/PocketMine.php --no-wizard", [
|
||||
$server = proc_open("php src/pocketmine/PocketMine.php --no-wizard --disable-readline", [
|
||||
0 => ["pipe", "w"],
|
||||
1 => ["file", "php://stdout", "w"],
|
||||
2 => ["file", "php://stderr", "w"]
|
||||
2 => ["pipe", "r"]
|
||||
], $pipes);
|
||||
|
||||
fwrite($pipes[0], "version\nmakeserver\nstop\n\n");
|
||||
|
||||
fclose($pipes[0]);
|
||||
fclose($pipes[2]);
|
||||
|
||||
echo "\n\nReturn value: ". proc_close($server) ."\n";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user