mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added DataPacketBroadcastEvent, refactor broadcast handling, close #1521
batchPackets() is now considered internal and shouldn't be used by plugins. Added Server->broadcastPackets(Player[], DataPacket[]) : bool
This commit is contained in:
@ -202,7 +202,9 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
//TODO: implement buffering (this is just a quick fix)
|
||||
$this->server->batchPackets([$this->player], [$packet], true, $immediate);
|
||||
$stream = new PacketStream();
|
||||
$stream->putPacket($packet);
|
||||
$this->server->batchPackets([$this], $stream, true, $immediate);
|
||||
|
||||
return true;
|
||||
}finally{
|
||||
|
Reference in New Issue
Block a user