Skip to content

Commit

Permalink
Handle client ping requests (#351)
Browse files Browse the repository at this point in the history
* Handle client ping requests

* Fmt
  • Loading branch information
neeleshpoli authored Nov 30, 2024
1 parent 5efa881 commit 136c0fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pumpkin/src/entity/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use pumpkin_core::{
use pumpkin_entity::{entity_type::EntityType, EntityId};
use pumpkin_inventory::player::PlayerInventory;
use pumpkin_macros::sound;
use pumpkin_protocol::server::play::SCookieResponse as SPCookieResponse;
use pumpkin_protocol::server::play::{SClickContainer, SKeepAlive};
use pumpkin_protocol::server::play::{SCookieResponse as SPCookieResponse, SPlayPingRequest};
use pumpkin_protocol::{
bytebuf::packet_id::Packet,
client::play::{
Expand Down Expand Up @@ -766,6 +766,10 @@ impl Player {
self.handle_player_command(SPlayerCommand::read(bytebuf)?)
.await;
}
SPlayPingRequest::PACKET_ID => {
self.handle_play_ping_request(SPlayPingRequest::read(bytebuf)?)
.await;
}
SClickContainer::PACKET_ID => {
self.handle_click_container(server, SClickContainer::read(bytebuf)?)
.await?;
Expand Down

0 comments on commit 136c0fc

Please sign in to comment.