diff options
Diffstat (limited to 'azalea/examples')
| -rw-r--r-- | azalea/examples/testbot.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs index 053e29b3..55c440a2 100644 --- a/azalea/examples/testbot.rs +++ b/azalea/examples/testbot.rs @@ -9,6 +9,7 @@ use azalea::pathfinder::BlockPosGoal; use azalea::{prelude::*, swarm::prelude::*, BlockPos, GameProfileComponent, WalkDirection}; use azalea::{Account, Client, Event}; use azalea_protocol::packets::game::serverbound_client_command_packet::ServerboundClientCommandPacket; +use azalea_protocol::packets::game::ClientboundGamePacket; use std::time::Duration; #[derive(Default, Clone, Component)] @@ -148,6 +149,12 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result< action: azalea_protocol::packets::game::serverbound_client_command_packet::Action::PerformRespawn, }.get()); } + Event::Packet(packet) => match *packet { + ClientboundGamePacket::Login(_) => { + println!("login packet"); + } + _ => {} + }, _ => {} } |
