mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
added nullsafe function, time should be set instantly after player joined, some php8 fixes
This commit is contained in:
parent
695f9f1484
commit
a66176b75d
5 changed files with 41 additions and 22 deletions
|
|
@ -1455,6 +1455,13 @@ class Player{
|
|||
$this->evid[] = $this->server->event("player.block.break", [$this, "eventHandler"]);
|
||||
$this->lastMeasure = microtime(true);
|
||||
$this->server->schedule(50, [$this, "measureLag"], [], true);
|
||||
|
||||
$pk = new SetTimePacket;
|
||||
$pk->time = (int) $this->level->getTime();
|
||||
$pk->started = !$this->level->isTimeStopped();
|
||||
$this->dataPacket($pk);
|
||||
|
||||
|
||||
console("[INFO] " . FORMAT_AQUA . $this->username . FORMAT_RESET . "[/" . $this->ip . ":" . $this->port . "] logged in with entity id " . $this->eid . " at (" . $this->entity->level->getName() . ", " . round($this->entity->x, 2) . ", " . round($this->entity->y, 2) . ", " . round($this->entity->z, 2) . ")");
|
||||
break;
|
||||
case ProtocolInfo::READY_PACKET:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue