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.
This commit is contained in:
lokka30
2024-10-26 18:25:03 +08:00
committed by GitHub
parent 29b3c8260b
commit 5a1c2451dd

View File

@@ -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<P>(&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<P>(&self, except: &[uuid::Uuid], packet: &P)