diff --git a/pumpkin/src/world/mod.rs b/pumpkin/src/world/mod.rs index c11d3715..82ccd60c 100644 --- a/pumpkin/src/world/mod.rs +++ b/pumpkin/src/world/mod.rs @@ -617,10 +617,10 @@ impl World { None } - /// Gets a Player by username + /// Gets a Player by username (case insensitive) pub async fn get_player_by_name(&self, name: &str) -> Option> { for player in self.current_players.lock().await.values() { - if player.gameprofile.name == name { + if player.gameprofile.name.to_lowercase() == name.to_lowercase() { return Some(player.clone()); } }