mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Buffered block changes and sending big changes with Chunk Packets
This commit is contained in:
parent
10ed95a469
commit
68855bdd4f
4 changed files with 68 additions and 23 deletions
|
|
@ -324,6 +324,14 @@ class PlayerAPI{
|
|||
}
|
||||
return $this->server->clients;
|
||||
}
|
||||
|
||||
public function broadcastPacket(array $players, $id, $data = array()){
|
||||
$data = new CustomPacketHandler($id, "", $data, true);
|
||||
$packet = array("raw" => chr($id).$data->raw);
|
||||
foreach($players as $p){
|
||||
$p->dataPacket(false, $packet);
|
||||
}
|
||||
}
|
||||
|
||||
public function getByEID($eid){
|
||||
$eid = (int) $eid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue