it's MAX view distance, not fixed

This commit is contained in:
Dylan K. Taylor 2021-12-15 01:42:29 +00:00
parent 79b5109953
commit 5f8ebd81d7
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -181,7 +181,7 @@ class Server{
public const DEFAULT_MAX_PLAYERS = 20;
public const DEFAULT_PORT_IPV4 = 19132;
public const DEFAULT_PORT_IPV6 = 19133;
public const DEFAULT_VIEW_DISTANCE = 8;
public const DEFAULT_MAX_VIEW_DISTANCE = 8;
private static ?Server $instance = null;
@ -337,7 +337,7 @@ class Server{
}
public function getViewDistance() : int{
return max(2, $this->configGroup->getConfigInt("view-distance", self::DEFAULT_VIEW_DISTANCE));
return max(2, $this->configGroup->getConfigInt("view-distance", self::DEFAULT_MAX_VIEW_DISTANCE));
}
/**
@ -820,7 +820,7 @@ class Server{
"level-type" => "DEFAULT",
"enable-query" => true,
"auto-save" => true,
"view-distance" => self::DEFAULT_VIEW_DISTANCE,
"view-distance" => self::DEFAULT_MAX_VIEW_DISTANCE,
"xbox-auth" => true,
"language" => "eng"
])