aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/lib.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2023-03-01 21:02:42 +0000
committermat <github@matdoes.dev>2023-03-01 21:02:42 +0000
commit7bfca9d228eb58839506f72555650d29ef26ee90 (patch)
treeac4e90dd38a2e6e60490a8c541e2129510788d26 /azalea/src/lib.rs
parent9b1b03d4ac59676393658f8558194490fe62a060 (diff)
parent91d97adb4f03acf2d53dedb598f5496e2c4d9063 (diff)
downloadazalea-drasl-7bfca9d228eb58839506f72555650d29ef26ee90.tar.xz
Merge branch 'main' of https://github.com/mat-1/azalea into main
Diffstat (limited to 'azalea/src/lib.rs')
-rw-r--r--azalea/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs
index 4e21fbbd..827c3904 100644
--- a/azalea/src/lib.rs
+++ b/azalea/src/lib.rs
@@ -106,6 +106,12 @@ where
self.handler = Some(handler);
self
}
+ /// Set the client state instead of initializing defaults.
+ #[must_use]
+ pub fn set_state(mut self, state: S) -> Self {
+ self.state = state;
+ self
+ }
/// Add a plugin to the client.
#[must_use]
pub fn add_plugin<T: Plugin>(mut self, plugin: T) -> Self {