Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github link in /pumpkin command #372

Merged
merged 18 commits into from
Dec 16, 2024
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ gradle-app.setting
*.zip
*.tar.gz
*.rar

lucas11222 marked this conversation as resolved.
Show resolved Hide resolved
configuration.toml
lucas11222 marked this conversation as resolved.
Show resolved Hide resolved
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
Expand Down
12 changes: 11 additions & 1 deletion pumpkin/src/command/commands/cmd_pumpkin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl CommandExecutor for PumpkinExecutor {
)
.add_child(
TextComponent::text(&format!(
" (Minecraft {CURRENT_MC_VERSION}, Protocol {CURRENT_MC_PROTOCOL})"
" (Minecraft {CURRENT_MC_VERSION}, Protocol {CURRENT_MC_PROTOCOL}) "
))
.click_event(ClickEvent::CopyToClipboard(Cow::from(format!(
"(Minecraft {CURRENT_MC_VERSION}, Protocol {CURRENT_MC_PROTOCOL})"
Expand All @@ -59,6 +59,16 @@ impl CommandExecutor for PumpkinExecutor {
"Click to Copy Minecraft Version",
)))
.color_named(NamedColor::Gold),
)
.add_child(
TextComponent::text("Github Repository")
lucas11222 marked this conversation as resolved.
Show resolved Hide resolved
.click_event(ClickEvent::OpenUrl(Cow::from(
"https://github.com/Snowiiii/Pumpkin",
)))
.hover_event(HoverEvent::ShowText(Cow::from("Click to open link.")))
.color_named(NamedColor::Blue)
.bold()
.underlined(),
),
)
.await;
Expand Down
Loading