mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Fixed crashes starting RCON
This commit is contained in:
@ -1486,7 +1486,18 @@ class Server{
|
||||
$this->scheduler = new ServerScheduler();
|
||||
|
||||
if($this->getConfigBoolean("enable-rcon", false) === true){
|
||||
$this->rcon = new RCON($this, $this->getConfigString("rcon.password", ""), $this->getConfigInt("rcon.port", $this->getPort()), ($ip = $this->getIp()) != "" ? $ip : "0.0.0.0", $this->getConfigInt("rcon.threads", 1), $this->getConfigInt("rcon.clients-per-thread", 50));
|
||||
try{
|
||||
$this->rcon = new RCON(
|
||||
$this,
|
||||
$this->getConfigString("rcon.password", ""),
|
||||
$this->getConfigInt("rcon.port", $this->getPort()),
|
||||
($ip = $this->getIp()) != "" ? $ip : "0.0.0.0",
|
||||
$this->getConfigInt("rcon.threads", 1),
|
||||
$this->getConfigInt("rcon.clients-per-thread", 50)
|
||||
);
|
||||
}catch(\Throwable $e){
|
||||
$this->getLogger()->critical("RCON can't be started: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
$this->entityMetadata = new EntityMetadataStore();
|
||||
|
Reference in New Issue
Block a user