Fix CommandManager method naming so that it is in sync with the 1.1.0 API

This commit is contained in:
Andrew Steinborn
2021-05-23 14:20:59 -04:00
parent b632431ae9
commit 3f50964f36
5 changed files with 24 additions and 24 deletions

View File

@@ -154,7 +154,7 @@ public class VelocityCommandManager implements CommandManager {
}
@Override
public CompletableFuture<Boolean> execute(final CommandSource source, final String cmdLine) {
public CompletableFuture<Boolean> executeAsync(final CommandSource source, final String cmdLine) {
Preconditions.checkNotNull(source, "source");
Preconditions.checkNotNull(cmdLine, "cmdLine");
@@ -168,7 +168,7 @@ public class VelocityCommandManager implements CommandManager {
}
@Override
public CompletableFuture<Boolean> executeImmediately(
public CompletableFuture<Boolean> executeImmediatelyAsync(
final CommandSource source, final String cmdLine) {
Preconditions.checkNotNull(source, "source");
Preconditions.checkNotNull(cmdLine, "cmdLine");

View File

@@ -598,7 +598,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
return CompletableFuture.runAsync(() -> smc.write(Chat.createServerbound("/"
+ commandToRun)), smc.eventLoop());
} else {
return server.getCommandManager().executeImmediately(player, commandToRun)
return server.getCommandManager().executeImmediatelyAsync(player, commandToRun)
.thenAcceptAsync(hasRun -> {
if (!hasRun) {
smc.write(Chat.createServerbound("/" + commandToRun));

View File

@@ -112,7 +112,7 @@ public final class VelocityConsole extends SimpleTerminalConsole implements Cons
@Override
protected void runCommand(String command) {
try {
if (!this.server.getCommandManager().execute(this, command).join()) {
if (!this.server.getCommandManager().executeAsync(this, command).join()) {
sendMessage(Component.text("Command not found.", NamedTextColor.RED));
}
} catch (Exception e) {