diff options
Diffstat (limited to 'azalea/examples/testbot')
| -rw-r--r-- | azalea/examples/testbot/commands/movement.rs | 3 | ||||
| -rw-r--r-- | azalea/examples/testbot/main.rs | 11 |
2 files changed, 7 insertions, 7 deletions
diff --git a/azalea/examples/testbot/commands/movement.rs b/azalea/examples/testbot/commands/movement.rs index 4957533f..3c66fefa 100644 --- a/azalea/examples/testbot/commands/movement.rs +++ b/azalea/examples/testbot/commands/movement.rs @@ -9,9 +9,8 @@ use azalea::{ }; use parking_lot::Mutex; -use crate::BotTask; - use super::{CommandSource, Ctx}; +use crate::BotTask; pub fn register(commands: &mut CommandDispatcher<Mutex<CommandSource>>) { commands.register( diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs index 6795e6cf..e7d68d5e 100644 --- a/azalea/examples/testbot/main.rs +++ b/azalea/examples/testbot/main.rs @@ -14,17 +14,17 @@ mod commands; pub mod killaura; -use azalea::pathfinder::PathfinderDebugParticles; -use azalea::ClientInformation; +use std::sync::Arc; +use std::time::Duration; use azalea::brigadier::command_dispatcher::CommandDispatcher; use azalea::ecs::prelude::*; +use azalea::pathfinder::PathfinderDebugParticles; use azalea::prelude::*; use azalea::swarm::prelude::*; +use azalea::ClientInformation; use commands::{register_commands, CommandSource}; use parking_lot::Mutex; -use std::sync::Arc; -use std::time::Duration; const USERNAME: &str = "azalea"; const ADDRESS: &str = "localhost"; @@ -38,10 +38,11 @@ const PATHFINDER_DEBUG_PARTICLES: bool = false; #[tokio::main] async fn main() { { - use parking_lot::deadlock; use std::thread; use std::time::Duration; + use parking_lot::deadlock; + // Create a background thread which checks for deadlocks every 10s thread::spawn(move || loop { thread::sleep(Duration::from_secs(10)); |
