geforkt von Mirrors/Velocity
Redesigned the /velocity command somewhat
Dieser Commit ist enthalten in:
Ursprung
d4910d9edc
Commit
731186ca10
@ -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 ? "<unknown>" : 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);
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren