fix: chat

This commit is contained in:
Alexander Medvedev 2025-01-23 21:23:32 +01:00
parent c4364d5d67
commit 42b79d446a
3 changed files with 8 additions and 8 deletions

View File

@ -20,6 +20,7 @@ pub struct CPlayerChatMessage<'a> {
previous_messages: &'a [PreviousMessage<'a>], // max 20
unsigned_content: Option<TextComponent>,
filter_type: FilterType,
/// This should not be zero, (index + 1)
chat_type: VarInt,
sender_name: TextComponent,
target_name: Option<TextComponent>,

View File

@ -561,7 +561,7 @@ impl Player {
&[],
Some(TextComponent::text(message.clone())),
FilterType::PassThrough,
CHAT.into(),
(CHAT + 1).into(),
TextComponent::text(gameprofile.name.clone()),
None,
))

View File

@ -1,6 +1,5 @@
use connection_cache::{CachedBranding, CachedStatus};
use crossbeam::atomic::AtomicCell;
use hmac::digest::consts::U6;
use key_store::KeyStore;
use pumpkin_config::{ADVANCED_CONFIG, BASIC_CONFIG};
use pumpkin_data::entity::EntityType;
@ -89,12 +88,12 @@ impl Server {
pub fn new() -> Self {
let auth_client = BASIC_CONFIG.online_mode.then(|| {
reqwest::Client::builder()
.connect_timeout(Duration::from_millis(
ADVANCED_CONFIG.networking.authentication.connect_timeout as u64,
))
.read_timeout(Duration::from_millis(
ADVANCED_CONFIG.networking.authentication.read_timeout as u64,
))
.connect_timeout(Duration::from_millis(u64::from(
ADVANCED_CONFIG.networking.authentication.connect_timeout,
)))
.read_timeout(Duration::from_millis(u64::from(
ADVANCED_CONFIG.networking.authentication.read_timeout,
)))
.build()
.expect("Failed to to make reqwest client")
});