From 28407d271126635326b0e8e5086cba5f8710ab66 Mon Sep 17 00:00:00 2001 From: MeexReay Date: Mon, 5 May 2025 23:05:56 +0300 Subject: [PATCH] move brand to a const --- src/server/protocol/handler.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/protocol/handler.rs b/src/server/protocol/handler.rs index c53e596..01e869a 100644 --- a/src/server/protocol/handler.rs +++ b/src/server/protocol/handler.rs @@ -14,6 +14,8 @@ use super::{ play::{handle_configuration_state, handle_play_state}, }; +pub const BRAND: &str = "rust_mc_serv"; + pub fn handle_connection( client: Arc, // Контекст клиента ) -> Result<(), ServerError> { @@ -165,7 +167,7 @@ pub fn handle_connection( clientbound::configuration::PLUGIN_MESSAGE, |p| { p.write_string("minecraft:brand")?; - p.write_string("rust_minecraft_server") + p.write_string(BRAND) }, )?)?;