Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support plugin message in configuration stage #1096

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

james58899
Copy link
Contributor

Fabric-API will send PluginMessage in configuration stage and use PingIdentify to confirm the client is ready, so Velocity must transfer packets to the backend server.

Fix #1095

String brand = PluginMessageUtil.readBrandMessage(packet.content());
server.getEventManager().fireAndForget(new PlayerClientBrandEvent(player, brand));
player.setClientBrand(brand);
// Client sends `minecraft:brand` packet immediately after Login,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably look into ensuring that this is at least sent somewhere if we can't just send it right now; I need to spend some time looking over this, ideally we should race hard to get the connection to the server into configuration so we can deal with syncing stuff, but, that is probably a wider headache to deal with someday (hopefully soon™)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client also won't send minecraft:brand when it re-enters the configuration stage after being connected, so I think it is safe to discard this packet.

In the design of Fabric-API, the client will only respond after receiving a packet from the server, so it should not lose any other packets.

@hazelthatsme
Copy link

Bump, would really like to see this fixed

@Tetricz
Copy link

Tetricz commented Oct 18, 2023

I too would like to see this fixed.

@james58899
Copy link
Contributor Author

@electronicboy Can it be merged at the current state? At least this allows 1.20.2 with FabricAPI to connect.

Before this PR, the velocity would discard all PluginMessages, and the vanilla server didn't handle PluginMessages at all. So, I don't think this PR will break anything unless it's already broken.

@DeathTrooperr
Copy link

Would love to see this fixed as well. Waiting to start a small Minecraft server network for my friends and I and this is the last thing missing.

@masmc05 masmc05 mentioned this pull request Oct 21, 2023
@astei astei merged commit 660160e into PaperMC:dev/3.0.0 Oct 27, 2023
1 check passed
@james58899 james58899 deleted the config-plugin-message branch December 20, 2023 08:31
skbeh pushed a commit to skbeh/Velocity that referenced this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Joining back-end Fabric server without content-adding mods yields "incomplete set of tags" disconnect message
7 participants