implemented the playerlist and player count

This commit is contained in:
Luuk van Oijen
2023-11-09 10:57:34 +01:00
parent 5011ae280c
commit efad9ec03e
2 changed files with 34 additions and 0 deletions

View File

@@ -322,6 +322,7 @@ impl Client {
self.disconnect();
}
// Panics when userdata is not set!
pub fn get_name(&self) -> &str {
&self.info.as_ref().unwrap().username
}
@@ -330,6 +331,7 @@ impl Client {
self.id
}
// Panics when userdata is not set!
pub fn get_roles(&self) -> &str {
&self.info.as_ref().unwrap().roles
}