Merge master into mcpe-1.0

This commit is contained in:
Dylan K. Taylor 2017-01-21 13:43:41 +00:00
commit 50b9034e16
3 changed files with 7 additions and 4 deletions

View File

@ -41,7 +41,10 @@ class CrashDump{
public function __construct(Server $server){
$this->time = time();
$this->server = $server;
$this->path = $this->server->getDataPath() . "CrashDump_" . date("D_M_j-H.i.s-T_Y", $this->time) . ".log";
if(!is_dir($this->server->getDataPath()) . "crashdumps"){
mkdir($this->server->getDataPath() . "crashdumps");
}
$this->path = $this->server->getDataPath() . "crashdumps/" . date("D_M_j-H.i.s-T_Y", $this->time) . ".log";
$this->fp = @fopen($this->path, "wb");
if(!is_resource($this->fp)){
throw new \RuntimeException("Could not create Crash Dump");

View File

@ -1917,7 +1917,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->forceMovement = new Vector3($this->x, $this->y, $this->z);
}
if($this->forceMovement instanceof Vector3 and (($dist = $newPos->distanceSquared($this->forceMovement)) > 0.1 or $revert)){
if($this->forceMovement instanceof Vector3 and ($newPos->distanceSquared($this->forceMovement) > 0.1 or $revert)){
$this->sendPosition($this->forceMovement, $packet->yaw, $packet->pitch, MovePlayerPacket::MODE_RESET);
}else{
$packet->yaw %= 360;

View File

@ -61,7 +61,7 @@ class HelpCommand extends VanillaCommand{
if($sender instanceof ConsoleCommandSender){
$pageHeight = PHP_INT_MAX;
}else{
$pageHeight = 5;
$pageHeight = 7;
}
if($command === ""){
@ -103,4 +103,4 @@ class HelpCommand extends VanillaCommand{
}
}
}
}