mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 14:42:32 +00:00
fix panic in azalea-chat
This commit is contained in:
parent
221b33197e
commit
a348f67b96
2 changed files with 5 additions and 1 deletions
|
@ -52,6 +52,10 @@ pub fn legacy_color_code_to_text_component(legacy_color_code: &str) -> TextCompo
|
|||
i += 1;
|
||||
}
|
||||
|
||||
if components.is_empty() {
|
||||
return TextComponent::new("".to_string());
|
||||
}
|
||||
|
||||
// create the final component by using the first one as the base, and then adding the rest as siblings
|
||||
let mut final_component = components.remove(0);
|
||||
for component in components {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{movement::MoveDirection, Account, Player};
|
||||
use azalea_auth::game_profile::GameProfile;
|
||||
use azalea_chat::component::Component;
|
||||
use azalea_core::{BlockPos, ChunkPos, ResourceLocation, Vec3};
|
||||
use azalea_core::{ChunkPos, ResourceLocation, Vec3};
|
||||
use azalea_protocol::{
|
||||
connect::{Connection, ConnectionError, ReadConnection, WriteConnection},
|
||||
packets::{
|
||||
|
|
Loading…
Reference in a new issue