Allow-flight disables speed checks

This commit is contained in:
Shoghi Cervantes 2013-05-21 08:24:17 +02:00
parent cd30f51979
commit ee12b41c39

View File

@ -958,7 +958,7 @@ class Player{
if(($this->entity instanceof Entity) and $data["counter"] > $this->lastMovement){ if(($this->entity instanceof Entity) and $data["counter"] > $this->lastMovement){
$this->lastMovement = $data["counter"]; $this->lastMovement = $data["counter"];
$speed = $this->entity->getSpeed(); $speed = $this->entity->getSpeed();
if($this->blocked === true or ($speed > 6 and ($this->gamemode & 0x01) === 0x00) or $speed > 15 or $this->server->api->handle("player.move", $this->entity) === false){ if($this->blocked === true or ($this->server->api->getProperty("allow-flight") !== true and (($speed > 6 and ($this->gamemode & 0x01) === 0x00) or $speed > 15)) or $this->server->api->handle("player.move", $this->entity) === false){
if($this->lastCorrect instanceof Vector3){ if($this->lastCorrect instanceof Vector3){
$this->teleport($this->lastCorrect, $this->entity->yaw, $this->entity->pitch, false); $this->teleport($this->lastCorrect, $this->entity->yaw, $this->entity->pitch, false);
} }