Added the "spawn-protection" property to define the protection radius

This commit is contained in:
Shoghi Cervantes Pueyo
2013-04-09 17:02:03 +02:00
parent 5f55cdf26a
commit e88c337229
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}
}