From 731186ca104d4cd9ad869157a5412491fea52a3b Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 27 Sep 2018 02:44:45 -0400 Subject: [PATCH] Redesigned the /velocity command somewhat --- .../proxy/command/VelocityCommand.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommand.java b/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommand.java index c8b72dbcd..ece4a834f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommand.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommand.java @@ -7,21 +7,20 @@ import com.velocitypowered.proxy.VelocityServer; import net.kyori.text.TextComponent; import net.kyori.text.event.ClickEvent; import net.kyori.text.format.TextColor; +import net.kyori.text.format.TextDecoration; import org.checkerframework.checker.nullness.qual.NonNull; public class VelocityCommand implements Command { @Override public void execute(CommandSource source, String[] args) { String implVersion = VelocityServer.class.getPackage().getImplementationVersion(); - TextComponent thisIsVelocity = TextComponent.builder() - .content("This is ") - .append(TextComponent.of("Velocity " + implVersion, TextColor.DARK_AQUA)) - .append(TextComponent.of(", the next generation Minecraft: Java Edition proxy.").resetStyle()) - .build(); - TextComponent velocityInfo = TextComponent.builder() - .content("Copyright 2018 Velocity Contributors. Velocity is freely licensed under the terms of the " + - "MIT License.") + TextComponent velocity = TextComponent.builder("Velocity ") + .decoration(TextDecoration.BOLD, true) + .color(TextColor.DARK_AQUA) + .append(TextComponent.of(implVersion == null ? "" : implVersion).decoration(TextDecoration.BOLD, false)) .build(); + TextComponent copyright = TextComponent.of("Copyright 2018 Velocity Contributors. Velocity is freely licensed under the terms of the " + + "MIT License."); TextComponent velocityWebsite = TextComponent.builder() .content("Visit the ") .append(TextComponent.builder("Velocity website") @@ -35,8 +34,8 @@ public class VelocityCommand implements Command { .build()) .build(); - source.sendMessage(thisIsVelocity); - source.sendMessage(velocityInfo); + source.sendMessage(velocity); + source.sendMessage(copyright); source.sendMessage(velocityWebsite); }