Skip to content

Commit

Permalink
fix(encryption): properly import plugin request packet
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspeedfpv committed Nov 12, 2024
1 parent 11e7207 commit 6204816
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/net/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use crate::{
};

#[cfg(feature = "encryption")]
use crate::protocol::{datatypes::Bytes, packets::PluginRequestC};
use crate::protocol::{datatypes::Bytes, packets::login::PluginRequestC};

use super::io::NetIo;

Expand Down Expand Up @@ -241,14 +241,15 @@ impl SharedPlayer {
}

#[cfg(feature = "encryption")]
async fn login_velocity(&mut self, _username: &str) -> Result<()> {
async fn login_velocity(&self, _username: &str) -> Result<()> {
let req = PluginRequestC {
message_id: VarInt(0),
channel: Bounded("velocity:player_info"),
data: Bounded(Bytes(&[3])),
};

self.io.tx(&req).await?;
let mut io = self.0.io.lock().await;
io.tx(&req).await?;

Ok(())
}
Expand Down

0 comments on commit 6204816

Please sign in to comment.