AddPlayerPacket is sent directly now

This commit is contained in:
GameHerobrine 2024-06-08 06:35:38 +03:00
parent 2a47f92d9a
commit c3b09096b4
5 changed files with 13 additions and 9 deletions

View file

@ -447,6 +447,7 @@ class PocketMinecraftServer{
if(!is_callable($callback)){
return false;
}
$chcnt = $this->scheduleCnt++;
$this->schedule[$chcnt] = [$callback, $data, $eventName];
$this->query("INSERT INTO actions (ID, interval, last, repeat) VALUES(" . $chcnt . ", " . ($ticks / 20) . ", " . microtime(true) . ", " . (((bool) $repeat) === true ? 1 : 0) . ");");
@ -604,7 +605,8 @@ class PocketMinecraftServer{
foreach($this->api->level->levels as $l){
$l->onTick($this, $time);
}
return $this->tickerFunction($time);
$r = $this->tickerFunction($time);
return $r;
}
return 0;
}