mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Generate and use constants for pocketmine.yml constant names
a couple of usages of properties that no longer exist couldn't be migrated. in addition, this revealed a couple of dead properties in the default file. this is not an ideal solution (I'd much rather model the configs using classes and map them) but in the absence of a good and reliable library to do that, this is the next best thing.
This commit is contained in:
@ -31,6 +31,7 @@ use pocketmine\utils\Internet;
|
||||
use pocketmine\utils\Process;
|
||||
use pocketmine\utils\Utils;
|
||||
use pocketmine\VersionInfo;
|
||||
use pocketmine\YmlServerProperties;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use function array_map;
|
||||
use function array_values;
|
||||
@ -57,7 +58,7 @@ class SendUsageTask extends AsyncTask{
|
||||
* @phpstan-param array<string, string> $playerList
|
||||
*/
|
||||
public function __construct(Server $server, int $type, array $playerList = []){
|
||||
$endpoint = "http://" . $server->getConfigGroup()->getPropertyString("anonymous-statistics.host", "stats.pocketmine.net") . "/";
|
||||
$endpoint = "http://" . $server->getConfigGroup()->getPropertyString(YmlServerProperties::ANONYMOUS_STATISTICS_HOST, "stats.pocketmine.net") . "/";
|
||||
|
||||
$data = [];
|
||||
$data["uniqueServerId"] = $server->getServerUniqueId()->toString();
|
||||
|
Reference in New Issue
Block a user