aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/lib.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-07 08:24:46 -1300
committermat <git@matdoes.dev>2025-05-07 16:28:03 -0500
commit1493c06de597fc320b79212d133f08c678763a6b (patch)
tree1ca27082a6c45fd84119d9c4eae2c3288d11205c /azalea/src/lib.rs
parent5d799be9dbfe2fd50aa2bdf30100f4df7e114674 (diff)
downloadazalea-drasl-1493c06de597fc320b79212d133f08c678763a6b.tar.xz
better docs for disabling plugins
Diffstat (limited to 'azalea/src/lib.rs')
-rw-r--r--azalea/src/lib.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs
index 3f388e42..26dde1fa 100644
--- a/azalea/src/lib.rs
+++ b/azalea/src/lib.rs
@@ -94,8 +94,10 @@ impl ClientBuilder<NoState, ()> {
.add_plugins(DefaultBotPlugins)
}
- /// [`Self::new`] but without adding the plugins by default. This is useful
- /// if you want to disable a default plugin.
+ /// [`Self::new`] but without adding the plugins by default.
+ ///
+ /// This is useful if you want to disable a default plugin. This also exists
+ /// for swarms, see [`SwarmBuilder::new_without_plugins`].
///
/// Note that you can also disable `LogPlugin` by disabling the `log`
/// feature.
@@ -104,12 +106,11 @@ impl ClientBuilder<NoState, ()> {
///
/// ```
/// # use azalea::prelude::*;
- /// use azalea::{app::PluginGroup, DefaultBotPlugins, DefaultPlugins};
- /// use bevy_log::LogPlugin;
+ /// use azalea::app::PluginGroup;
///
/// let client_builder = ClientBuilder::new_without_plugins()
- /// .add_plugins(DefaultPlugins.build().disable::<LogPlugin>())
- /// .add_plugins(DefaultBotPlugins);
+ /// .add_plugins(azalea::DefaultPlugins.build().disable::<azalea::chat_signing::ChatSigningPlugin>())
+ /// .add_plugins(azalea::DefaultBotPlugins);
/// # client_builder.set_handler(handle);
/// # #[derive(Component, Clone, Default)]
/// # pub struct State;
@@ -171,6 +172,9 @@ where
self
}
/// Add a group of plugins to the client.
+ ///
+ /// See [`Self::new_without_plugins`] to learn how to disable default
+ /// plugins.
#[must_use]
pub fn add_plugins<M>(mut self, plugins: impl Plugins<M>) -> Self {
self.swarm = self.swarm.add_plugins(plugins);