mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Level: Rename addGlobalPacket() to broadcastGlobalPacket()
this name makes the intention more clear and consistent with other functions.
This commit is contained in:
parent
d563b9e31b
commit
cb1eb1ee09
@ -490,7 +490,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
$this->broadcastPacketToViewers($pos, $pk);
|
$this->broadcastPacketToViewers($pos, $pk);
|
||||||
}else{
|
}else{
|
||||||
$pk->position = null;
|
$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
|
* @param DataPacket $packet
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user