mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
paintings are separated from Entity.php, removed Moved too Quickly warning, small fixes with commands
This commit is contained in:
parent
218dd4ffa4
commit
af79b29f26
7 changed files with 49 additions and 28 deletions
|
|
@ -1520,16 +1520,7 @@ class Player{
|
|||
}
|
||||
}
|
||||
$speed = $this->entity->getSpeedMeasure();
|
||||
if($this->blocked === true or ($this->server->api->getProperty("allow-flight") !== true and (($speed > 9 and ($this->gamemode & 0x01) === 0x00) or $speed > 20 or $this->entity->distance($newPos) > 7)) or $this->server->api->handle("player.move", $this->entity) === false){
|
||||
if($this->lastCorrect instanceof Vector3){
|
||||
$this->teleport($this->lastCorrect, $this->entity->yaw, $this->entity->pitch, false);
|
||||
}
|
||||
if($this->blocked !== true){
|
||||
console("[WARNING] ".$this->username." moved too quickly!");
|
||||
}
|
||||
}else{
|
||||
$this->entity->setPosition($newPos, $packet->yaw, $packet->pitch);
|
||||
}
|
||||
$this->entity->setPosition($newPos, $packet->yaw, $packet->pitch);
|
||||
}
|
||||
break;
|
||||
case ProtocolInfo::PLAYER_EQUIPMENT_PACKET:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue