Skip to content

Commit

Permalink
Made getting players by name case-insensitive (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealVaprant authored Jan 5, 2025
1 parent 3bb30c4 commit 6a34f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pumpkin/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ impl World {
/// Gets a Player by username
pub async fn get_player_by_name(&self, name: &str) -> Option<Arc<Player>> {
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());
}
}
Expand Down

0 comments on commit 6a34f6c

Please sign in to comment.