mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
Extract ServerConfigGroup from Server
this API isn't very nice, but it's pretty much the same as the original, and at least this can be _kinda_ unit-tested...
This commit is contained in:
@@ -97,7 +97,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
$threadToMainBuffer,
|
||||
new InternetAddress($this->server->getIp(), $this->server->getPort(), 4),
|
||||
$this->rakServerId,
|
||||
(int) $this->server->getProperty("network.max-mtu-size", 1492),
|
||||
(int) $this->server->getConfigGroup()->getProperty("network.max-mtu-size", 1492),
|
||||
self::MCPE_RAKNET_PROTOCOL_VERSION,
|
||||
$this->sleeper
|
||||
);
|
||||
|
@@ -76,7 +76,7 @@ final class QueryInfo{
|
||||
|
||||
public function __construct(Server $server){
|
||||
$this->serverName = $server->getMotd();
|
||||
$this->listPlugins = $server->getProperty("settings.query-plugins", true);
|
||||
$this->listPlugins = $server->getConfigGroup()->getProperty("settings.query-plugins", true);
|
||||
$this->plugins = $server->getPluginManager()->getPlugins();
|
||||
$this->players = $server->getOnlinePlayers();
|
||||
|
||||
|
Reference in New Issue
Block a user