From 5a1c2451dd9b4e8bd0f36a7cad03c2e2632ba013 Mon Sep 17 00:00:00 2001 From: lokka30 <59464084+lokka30@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:25:03 +0800 Subject: [PATCH] world docs: corrected to 'world', not 'server' (#191) These functions access only the world itself's current players, and thus the old documentation was incorrect saying that it accesses the server's online players. --- pumpkin/src/world/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pumpkin/src/world/mod.rs b/pumpkin/src/world/mod.rs index 77fe2599..119e3681 100644 --- a/pumpkin/src/world/mod.rs +++ b/pumpkin/src/world/mod.rs @@ -74,7 +74,7 @@ impl World { /// Broadcasts a packet to all connected players within the world. /// - /// Sends the specified packet to every player currently logged in to the server. + /// Sends the specified packet to every player currently logged in to the world. /// /// **Note:** This function acquires a lock on the `current_players` map, ensuring thread safety. pub async fn broadcast_packet_all

(&self, packet: &P) @@ -89,7 +89,7 @@ impl World { /// Broadcasts a packet to all connected players within the world, excluding the specified players. /// - /// Sends the specified packet to every player currently logged in to the server, excluding the players listed in the `except` parameter. + /// Sends the specified packet to every player currently logged in to the world, excluding the players listed in the `except` parameter. /// /// **Note:** This function acquires a lock on the `current_players` map, ensuring thread safety. pub async fn broadcast_packet_expect

(&self, except: &[uuid::Uuid], packet: &P)