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)); - callback.accept(message.withUnsignedContent(component));
+ // Paper start + // Paper start
+ CompletableFuture<ChatDecorator.Result> componentFuture = chatDecorator.decorate(source.getPlayer(), source, message.decoratedContent()); + 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 + // Paper end
} }