Level: Rename addGlobalPacket() to broadcastGlobalPacket()

this name makes the intention more clear and consistent with other functions.
This commit is contained in:
Dylan K. Taylor 2018-10-20 15:24:33 +01:00
parent d563b9e31b
commit cb1eb1ee09

View File

@ -490,7 +490,7 @@ class Level implements ChunkManager, Metadatable{
$this->broadcastPacketToViewers($pos, $pk);
}else{
$pk->position = null;
$this->addGlobalPacket($pk);
$this->broadcastGlobalPacket($pk);
}
}
@ -622,7 +622,17 @@ class Level implements ChunkManager, Metadatable{
}
/**
* Queues a DataPacket to be sent to everyone in the Level at the end of the current tick.
* Broadcasts a packet to every player in the level.
*
* @param DataPacket $packet
*/
public function broadcastGlobalPacket(DataPacket $packet) : void{
$this->globalPackets[] = $packet;
}
/**
* @deprecated
* @see Level::broadcastGlobalPacket()
*
* @param DataPacket $packet
*/