feat: Make version clickable in velocity info command (#1775)

This commit is contained in:
Emil
2026-07-19 16:02:20 +02:00
committed by GitHub
parent e653647962
commit b45716deff
2 changed files with 8 additions and 4 deletions
@@ -163,6 +163,9 @@ public final class VelocityCommand {
.append(Component.text() .append(Component.text()
.content(version.getVersion()) .content(version.getVersion())
.decoration(TextDecoration.BOLD, false)) .decoration(TextDecoration.BOLD, false))
.hoverEvent(Component.translatable("velocity.command.version-offer-copy-version"))
.clickEvent(ClickEvent.copyToClipboard(version.getName() + " "
+ version.getVersion()))
.build(); .build();
final Component copyright = Component final Component copyright = Component
.translatable("velocity.command.version-copyright", .translatable("velocity.command.version-copyright",
@@ -50,6 +50,7 @@ velocity.command.glist-view-all=To view all players on servers, use /glist all.
velocity.command.reload-success=Velocity configuration successfully reloaded. velocity.command.reload-success=Velocity configuration successfully reloaded.
velocity.command.reload-failure=Unable to reload your Velocity configuration. Check the console for more details. velocity.command.reload-failure=Unable to reload your Velocity configuration. Check the console for more details.
velocity.command.version-copyright=Copyright 2018-<arg:2> <arg:0>. <arg:1> is licensed under the terms of the GNU General Public License v3. velocity.command.version-copyright=Copyright 2018-<arg:2> <arg:0>. <arg:1> is licensed under the terms of the GNU General Public License v3.
velocity.command.version-offer-copy-version=Click to copy version to clipboard
velocity.command.no-plugins=There are no plugins currently installed. velocity.command.no-plugins=There are no plugins currently installed.
velocity.command.plugins-list=Plugins: <arg:0> velocity.command.plugins-list=Plugins: <arg:0>
velocity.command.plugin-tooltip-website=Website: <arg:0> velocity.command.plugin-tooltip-website=Website: <arg:0>