Buffered block changes and sending big changes with Chunk Packets

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-19 19:27:55 +02:00
parent 10ed95a469
commit 68855bdd4f
4 changed files with 68 additions and 23 deletions

View file

@ -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;