mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-28 12:07:42 +01:00
Do not send packet to empty collection
This commit is contained in:
parent
98fe83c605
commit
871cb993b4
@ -39,6 +39,9 @@ public final class PacketUtils {
|
||||
* @param packet the packet to send to the players
|
||||
*/
|
||||
public static void sendGroupedPacket(@NotNull Collection<Player> players, @NotNull ServerPacket packet) {
|
||||
if (players.isEmpty())
|
||||
return;
|
||||
|
||||
final boolean success = PACKET_LISTENER_MANAGER.processServerPacket(packet, players);
|
||||
if (success) {
|
||||
final ByteBuf finalBuffer = createFramedPacket(packet);
|
||||
|
Loading…
Reference in New Issue
Block a user