mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
DataPacketSendEvent: added setPackets()
this is an implicit BC break, since plugins may assume that the packets in this array aren't going to change. However, in practice, it's not likely to cause any real issues.
This commit is contained in:
@ -436,8 +436,11 @@ class NetworkSession{
|
||||
if($ev->isCancelled()){
|
||||
return false;
|
||||
}
|
||||
$packets = $ev->getPackets();
|
||||
|
||||
$this->addToSendBuffer($packet);
|
||||
foreach($packets as $evPacket){
|
||||
$this->addToSendBuffer($evPacket);
|
||||
}
|
||||
if($immediate){
|
||||
$this->flushSendBuffer(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user