aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/client_impl/client_information.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src/client_impl/client_information.rs')
-rw-r--r--azalea/src/client_impl/client_information.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/azalea/src/client_impl/client_information.rs b/azalea/src/client_impl/client_information.rs
index b3cf7927..3b408d58 100644
--- a/azalea/src/client_impl/client_information.rs
+++ b/azalea/src/client_impl/client_information.rs
@@ -2,7 +2,7 @@ use azalea_client::ClientInformation;
use azalea_protocol::packets::game;
use tracing::debug;
-use crate::Client;
+use crate::{Client, client_impl::error::AzaleaResult};
impl Client {
/// Tell the server we changed our game options (i.e. render distance, main
@@ -20,10 +20,13 @@ impl Client {
/// # Ok(())
/// # }
/// ```
- pub fn set_client_information(&self, client_information: ClientInformation) {
+ pub fn set_client_information(
+ &self,
+ client_information: ClientInformation,
+ ) -> AzaleaResult<()> {
self.query_self::<&mut ClientInformation, _>(|mut ci| {
*ci = client_information.clone();
- });
+ })?;
if self.logged_in() {
debug!(
@@ -34,5 +37,7 @@ impl Client {
client_information,
});
}
+
+ Ok(())
}
}