Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
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.TextComponent;
|
||||||
import net.kyori.text.event.ClickEvent;
|
import net.kyori.text.event.ClickEvent;
|
||||||
import net.kyori.text.format.TextColor;
|
import net.kyori.text.format.TextColor;
|
||||||
|
import net.kyori.text.format.TextDecoration;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
|
||||||
public class VelocityCommand implements Command {
|
public class VelocityCommand implements Command {
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSource source, String[] args) {
|
public void execute(CommandSource source, String[] args) {
|
||||||
String implVersion = VelocityServer.class.getPackage().getImplementationVersion();
|
String implVersion = VelocityServer.class.getPackage().getImplementationVersion();
|
||||||
TextComponent thisIsVelocity = TextComponent.builder()
|
TextComponent velocity = TextComponent.builder("Velocity ")
|
||||||
.content("This is ")
|
.decoration(TextDecoration.BOLD, true)
|
||||||
.append(TextComponent.of("Velocity " + implVersion, TextColor.DARK_AQUA))
|
.color(TextColor.DARK_AQUA)
|
||||||
.append(TextComponent.of(", the next generation Minecraft: Java Edition proxy.").resetStyle())
|
.append(TextComponent.of(implVersion == null ? "<unknown>" : implVersion).decoration(TextDecoration.BOLD, false))
|
||||||
.build();
|
|
||||||
TextComponent velocityInfo = TextComponent.builder()
|
|
||||||
.content("Copyright 2018 Velocity Contributors. Velocity is freely licensed under the terms of the " +
|
|
||||||
"MIT License.")
|
|
||||||
.build();
|
.build();
|
||||||
|
TextComponent copyright = TextComponent.of("Copyright 2018 Velocity Contributors. Velocity is freely licensed under the terms of the " +
|
||||||
|
"MIT License.");
|
||||||
TextComponent velocityWebsite = TextComponent.builder()
|
TextComponent velocityWebsite = TextComponent.builder()
|
||||||
.content("Visit the ")
|
.content("Visit the ")
|
||||||
.append(TextComponent.builder("Velocity website")
|
.append(TextComponent.builder("Velocity website")
|
||||||
@ -35,8 +34,8 @@ public class VelocityCommand implements Command {
|
|||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
source.sendMessage(thisIsVelocity);
|
source.sendMessage(velocity);
|
||||||
source.sendMessage(velocityInfo);
|
source.sendMessage(copyright);
|
||||||
source.sendMessage(velocityWebsite);
|
source.sendMessage(velocityWebsite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren