Fix CommandManager method naming so that it is in sync with the 1.1.0 API
This commit is contained in:
@@ -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");
|
||||
|
@@ -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));
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user