Conversation API not working #216

Open
opened 2024-04-14 18:23:01 +02:00 by timderspieler · 2 comments
timderspieler commented 2024-04-14 18:23:01 +02:00 (Migrated from github.com)

Expected behavior

The Conversation API working correctly.

Observed/Actual behavior

This bug already has been reported under: https://github.com/PaperMC/Folia/issues/24

After nearly a year I'd like to ask if there are any news regarding the broken Conversation API of Folia. Beginning a new conversation with a player results in the chat being broken. No message can be send anymore upon restarting the server.

[17:40:57 ERROR]: Chain link failed, continuing to next one
java.lang.UnsupportedOperationException: null
        at net.minecraft.server.network.ServerGamePacketListenerImpl.broadcastChatMessage(ServerGamePacketListenerImpl.java:2492) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChat$13(ServerGamePacketListenerImpl.java:2221) ~[?:?]
        at net.minecraft.util.FutureChain.lambda$append$1(FutureChain.java:27) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Steps/models to reproduce

Player player = getPlayer();

player.beginConversation(new Conversation(SimplePlugin.getInstance(), player, new ValidatingPrompt() {

	@Override
	public String getPromptText(ConversationContext context) {
		context.getForWhom().sendRawMessage("Dopice");

		return "Type anything";
	}

	@Override
	protected boolean isInputValid(ConversationContext context, String input) {
		return false;
	}

	@Override
	protected Prompt acceptValidatedInput(ConversationContext context, String input) {
		return Prompt.END_OF_CONVERSATION;
	}
}));

Plugin and Datapack List

No plugins are installed except mine which uses the Conversation API.

Folia version

This server is running Folia version git-Folia-"25ee657" (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 25ee657)

Other

No response

### Expected behavior The Conversation API working correctly. ### Observed/Actual behavior This bug already has been reported under: https://github.com/PaperMC/Folia/issues/24 After nearly a year I'd like to ask if there are any news regarding the broken Conversation API of Folia. Beginning a new conversation with a player results in the chat being broken. No message can be send anymore upon restarting the server. ``` [17:40:57 ERROR]: Chain link failed, continuing to next one java.lang.UnsupportedOperationException: null at net.minecraft.server.network.ServerGamePacketListenerImpl.broadcastChatMessage(ServerGamePacketListenerImpl.java:2492) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChat$13(ServerGamePacketListenerImpl.java:2221) ~[?:?] at net.minecraft.util.FutureChain.lambda$append$1(FutureChain.java:27) ~[folia-1.20.4.jar:git-Folia-"25ee657"] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?] at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] ``` ### Steps/models to reproduce ``` Player player = getPlayer(); player.beginConversation(new Conversation(SimplePlugin.getInstance(), player, new ValidatingPrompt() { @Override public String getPromptText(ConversationContext context) { context.getForWhom().sendRawMessage("Dopice"); return "Type anything"; } @Override protected boolean isInputValid(ConversationContext context, String input) { return false; } @Override protected Prompt acceptValidatedInput(ConversationContext context, String input) { return Prompt.END_OF_CONVERSATION; } })); ``` ### Plugin and Datapack List No plugins are installed except mine which uses the Conversation API. ### Folia version This server is running Folia version git-Folia-"25ee657" (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 25ee657) ### Other _No response_
electronicboy commented 2024-04-14 18:26:23 +02:00 (Migrated from github.com)

That API is currently in a weird state due to the fact that it relies upon legacy behaviours, it's not currently planned on what we want to do for it on paper, and so I'd imagine it's at a much lower priority for folia to resolve this as part of the 20 other dozen APIs which are currently missing

That API is currently in a weird state due to the fact that it relies upon legacy behaviours, it's not currently planned on what we want to do for it on paper, and so I'd imagine it's at a much lower priority for folia to resolve this as part of the 20 other dozen APIs which are currently missing
timderspieler commented 2024-04-14 18:31:02 +02:00 (Migrated from github.com)

Thank you for the fast reply @electronicboy! Thats unfortunate but Folia's standpoint on this is understandable.

Thank you for the fast reply @electronicboy! Thats unfortunate but Folia's standpoint on this is understandable.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia#216
No description provided.