From ee4d302f1ed192cd5ac64bb777f083b8e97db93e Mon Sep 17 00:00:00 2001 From: Jakub Gniecki Date: Sat, 1 Aug 2020 19:26:53 +0200 Subject: [PATCH] Example Properties --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 947bb04..50160a4 100644 --- a/README.md +++ b/README.md @@ -98,5 +98,29 @@ This class allows downloading logs from the server. echo implode("
", $logs->getLogs(true)); ``` +### Properties + +```php +login($login, $password); + $sftp->setTimeout(3); + + $properties = Properties::generate($sftp, "mc/server.properties"); + $port = (int) $properties->getProperty("server-port"); + $query_port = (int) $properties->getProperty("query.port"); + $rcon_port = (int) $properties->getProperty("rcon.port"); + $rcon_pass = $properties->getProperty("rcon.password"); + +``` + ## License [MIT](LICENSE) \ No newline at end of file