From bb5dd85659eb9908e5c6463f681fb712c01ab42e Mon Sep 17 00:00:00 2001 From: Commandcracker <49335821+Commandcracker@users.noreply.github.com> Date: Sat, 30 Nov 2024 21:37:17 +0100 Subject: [PATCH] Use extra in seed command --- 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(())