Skip to content

Commit

Permalink
add Github link in /pumpkin command (#372)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lucas11222 authored Dec 16, 2024
1 parent cbf9e63 commit 9a2e68a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
26 changes: 26 additions & 0 deletions pumpkin/src/command/commands/cmd_pumpkin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9a2e68a

Please sign in to comment.