diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java index 7c89f659..eb9c9bca 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java @@ -359,7 +359,12 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler { // Inject commands from the proxy. final CommandGraphInjector injector = server.getCommandManager().getInjector(); injector.inject(rootNode, serverConn.getPlayer()); - rootNode.removeChildByName("velocity:callback"); + + // In 1.21.6 a confirmation prompt was added when executing a command via `run_command` click + // action if the command is unknown. To prevent this prompt we have to send the command. + if (this.playerConnection.getProtocolVersion().lessThan(ProtocolVersion.MINECRAFT_1_21_6)) { + rootNode.removeChildByName("velocity:callback"); + } } server.getEventManager().fire(