fix: send callback command to >= 1.21.6 clients (#1627)
This commit is contained in:
@@ -359,7 +359,12 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
// Inject commands from the proxy.
|
||||
final CommandGraphInjector<CommandSource> 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(
|
||||
|
||||
Reference in New Issue
Block a user