mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09:39 +00:00
RCON: remove unnecessary function
This commit is contained in:
parent
1ebc101ded
commit
17fee801e6
@ -100,7 +100,13 @@ class RCON{
|
|||||||
|
|
||||||
$notifier = new SleeperNotifier();
|
$notifier = new SleeperNotifier();
|
||||||
$this->server->getTickSleeper()->addNotifier($notifier, function() : void{
|
$this->server->getTickSleeper()->addNotifier($notifier, function() : void{
|
||||||
$this->check();
|
$response = new RemoteConsoleCommandSender();
|
||||||
|
$this->server->dispatchCommand($response, $this->instance->cmd);
|
||||||
|
|
||||||
|
$this->instance->response = TextFormat::clean($response->getMessage());
|
||||||
|
$this->instance->synchronized(function(RCONInstance $thread){
|
||||||
|
$thread->notify();
|
||||||
|
}, $this->instance);
|
||||||
});
|
});
|
||||||
$this->instance = new RCONInstance($this->socket, $password, (int) max(1, $maxClients), $this->server->getLogger(), $this->ipcThreadSocket, $notifier);
|
$this->instance = new RCONInstance($this->socket, $password, (int) max(1, $maxClients), $this->server->getLogger(), $this->ipcThreadSocket, $notifier);
|
||||||
|
|
||||||
@ -117,14 +123,4 @@ class RCON{
|
|||||||
@socket_close($this->ipcMainSocket);
|
@socket_close($this->ipcMainSocket);
|
||||||
@socket_close($this->ipcThreadSocket);
|
@socket_close($this->ipcThreadSocket);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function check() : void{
|
|
||||||
$response = new RemoteConsoleCommandSender();
|
|
||||||
$this->server->dispatchCommand($response, $this->instance->cmd);
|
|
||||||
|
|
||||||
$this->instance->response = TextFormat::clean($response->getMessage());
|
|
||||||
$this->instance->synchronized(function(RCONInstance $thread){
|
|
||||||
$thread->notify();
|
|
||||||
}, $this->instance);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user