13
0
geforkt von Mirrors/Velocity

Enhance /velocity command. Closes #145

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-11-22 19:29:02 -05:00
Ursprung 960f2cf890
Commit 40e7ef784f

Datei anzeigen

@ -92,7 +92,7 @@ public class VelocityCommand implements Command {
@Override
public boolean hasPermission(CommandSource source, String @NonNull [] args) {
if (args.length == 0) {
return true;
return subcommands.values().stream().anyMatch(e -> e.hasPermission(source, args));
}
Command command = subcommands.get(args[0].toLowerCase(Locale.US));
if (command == null) {
@ -113,6 +113,11 @@ public class VelocityCommand implements Command {
@Override
public void execute(CommandSource source, String @NonNull [] args) {
if (args.length != 0) {
source.sendMessage(TextComponent.of("/velocity version", TextColor.RED));
return;
}
ProxyVersion version = server.getVersion();
TextComponent velocity = TextComponent.builder(version.getName() + " ")