From 3fecdcb3de79b9ddbf4cd4c933558255d14e0655 Mon Sep 17 00:00:00 2001 From: Commandcracker <49335821+Commandcracker@users.noreply.github.com> Date: Mon, 2 Dec 2024 19:25:59 +0100 Subject: [PATCH] fix seed command formatting (#358) --- pumpkin/src/command/commands/cmd_seed.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pumpkin/src/command/commands/cmd_seed.rs b/pumpkin/src/command/commands/cmd_seed.rs index 653697aa7..18b4c3609 100644 --- a/pumpkin/src/command/commands/cmd_seed.rs +++ b/pumpkin/src/command/commands/cmd_seed.rs @@ -39,12 +39,16 @@ impl CommandExecutor for PumpkinExecutor { sender .send_message( - TextComponent::text(&format!("Seed: [{seed}]")) - .hover_event(HoverEvent::ShowText(Cow::from( - "Click to Copy to Clipboard", - ))) - .click_event(ClickEvent::CopyToClipboard(Cow::from(seed))) - .color_named(NamedColor::Green), // TODO: use white and green, when possible + TextComponent::text("Seed: [") + .add_child( + TextComponent::text(&seed.clone()) + .hover_event(HoverEvent::ShowText(Cow::from( + "Click to Copy to Clipboard", + ))) + .click_event(ClickEvent::CopyToClipboard(Cow::from(seed))) + .color_named(NamedColor::Green), + ) + .add_child(TextComponent::text("]")), ) .await; Ok(())