Fix command block async message (again) (#10082)

This commit is contained in:
Jake Potrebic 2023-12-27 01:30:15 -08:00
parent fab261ae0b
commit 2461bcfe65

View file

@ -2137,7 +2137,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- callback.accept(message.withUnsignedContent(component));
+ // Paper start
+ CompletableFuture<ChatDecorator.Result> componentFuture = chatDecorator.decorate(source.getPlayer(), source, message.decoratedContent());
+ source.getChatMessageChainer().append(() -> componentFuture.thenAccept((result) -> callback.accept(message.withUnsignedContent(result.component()))));
+ source.getChatMessageChainer().append(componentFuture, (result) -> callback.accept(message.withUnsignedContent(result.component())));
+ // Paper end
}