azalea-rs / azalea

A collection of Rust crates for making Minecraft bots, clients, and tools.
https://azalea.matdoes.dev
MIT License
399 stars 50 forks source link

disable LogPlugin in a prettier way #92

Closed xtexChooser closed 1 year ago

xtexChooser commented 1 year ago

Currently, we have to disable the bevy_log plugin with a lot of code

pub fn new_client_builder<S, Fut>() -> ClientBuilder<S, Fut>
where
    S: Default + Send + Sync + Clone + Component + 'static,
    Fut: Future<Output = Result<(), anyhow::Error>> + Send + 'static,
{
    ClientBuilder::new_without_plugins()
        .add_plugins(DefaultPlugins.build().disable::<bevy_log::LogPlugin>())
        .add_plugins(DefaultBotPlugins)
}

and bevy_log must be added as a direct dependency.

Is there a better way to disable it? For example, ClientBuilder::new_without_log()?