mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Improved broadcast packet encoding
This commit is contained in:
@ -1692,8 +1692,10 @@ class Server{
|
||||
* @param DataPacket $packet
|
||||
*/
|
||||
public static function broadcastPacket(array $players, DataPacket $packet){
|
||||
$packet->encode();
|
||||
$packet->isEncoded = true;
|
||||
foreach($players as $player){
|
||||
$player->dataPacket(clone $packet);
|
||||
$player->dataPacket($packet);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user