diff --git a/src/API/BanAPI.php b/src/API/BanAPI.php index e1e65077f..fe26360ef 100644 --- a/src/API/BanAPI.php +++ b/src/API/BanAPI.php @@ -79,7 +79,7 @@ class BanAPI{ if(!$this->isOp($data["player"]->iusername)){ $t = new Vector2($data["target"]->x, $data["target"]->z); $s = new Vector2($this->server->spawn["x"], $this->server->spawn["z"]); - if($t->distance($s) <= 16.5 and $this->server->api->dhandle($event.".spawn", $data) !== true){ + if($t->distance($s) <= $this->server->getProperty("spawn-protection") and $this->server->api->dhandle($event.".spawn", $data) !== true){ return false; } } diff --git a/src/API/ServerAPI.php b/src/API/ServerAPI.php index 84e4953a6..52a65cdbb 100644 --- a/src/API/ServerAPI.php +++ b/src/API/ServerAPI.php @@ -95,6 +95,7 @@ class ServerAPI{ "last-update" => false, "white-list" => false, "debug" => 1, + "spawn-protection" => 16, "max-players" => 20, "server-type" => "normal", "time-per-second" => 20,