From 9a2e68a053fc98073d2804a7dc5b92b78636ec7b Mon Sep 17 00:00:00 2001 From: Lucas11 <63660708+lucas11222@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:30:23 +0100 Subject: [PATCH] add Github link in /pumpkin command (#372) * Add the text and the open link * Update cmd_pumpkin.rs * Fixed all the warnings and clippy and fmt * fixed more * trying to fix confics * Fixed a bug * another one * Update .gitignore * Update cmd_pumpkin.rs * Added docs * Formated * Update cmd_pumpkin.rs * im gonna test * Change color bcs aqua is ugly * Update cmd_pumpkin.rs * Update cmd_pumpkin.rs * Update cmd_pumpkin.rs --- .gitignore | 1 - pumpkin/src/command/commands/cmd_pumpkin.rs | 26 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9016d3545..4b08876e5 100644 --- a/.gitignore +++ b/.gitignore @@ -74,7 +74,6 @@ gradle-app.setting *.zip *.tar.gz *.rar - # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* replay_pid* diff --git a/pumpkin/src/command/commands/cmd_pumpkin.rs b/pumpkin/src/command/commands/cmd_pumpkin.rs index 2b2f41a21..3dad98ecd 100644 --- a/pumpkin/src/command/commands/cmd_pumpkin.rs +++ b/pumpkin/src/command/commands/cmd_pumpkin.rs @@ -59,6 +59,32 @@ impl CommandExecutor for PumpkinExecutor { "Click to Copy Minecraft Version", ))) .color_named(NamedColor::Gold), + ) + .add_child(TextComponent::text(" ")) + // https://snowiiii.github.io/Pumpkin/ + .add_child( + TextComponent::text("Github Repository") + .click_event(ClickEvent::OpenUrl(Cow::from( + "https://github.com/Snowiiii/Pumpkin", + ))) + .hover_event(HoverEvent::ShowText(Cow::from( + "Click to open repository.", + ))) + .color_named(NamedColor::Blue) + .bold() + .underlined(), + ) + // Added docs. and a space for spacing + .add_child(TextComponent::text(" ")) + .add_child( + TextComponent::text("Docs") + .click_event(ClickEvent::OpenUrl(Cow::from( + "https://snowiiii.github.io/Pumpkin/", + ))) + .hover_event(HoverEvent::ShowText(Cow::from("Click to open docs."))) + .color_named(NamedColor::Blue) + .bold() + .underlined(), ), ) .await;