Skip to content

Commit

Permalink
fix seed command formatting (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
Commandcracker authored Dec 2, 2024
1 parent 979877f commit 3fecdcb
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pumpkin/src/command/commands/cmd_seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit 3fecdcb

Please sign in to comment.