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

Fix PlayerDiedEventData #148

Merged
merged 2 commits into from Aug 26, 2022
Merged

Fix PlayerDiedEventData #148

merged 2 commits into from Aug 26, 2022

Conversation

egor-erm
Copy link
Contributor

I use gophertunnel as a proxy server. When a player dies, an error message arrives (*packet.Event: 2 unread bytes left: 0x0a00). I found a mismatch of PlayerDiedEventData with the original protocol. After the correction, no errors occur.

https://github.com/CloudburstMC/Protocol/blob/f92336f2433875a1116c103dc0100b92cd260e2b/bedrock/bedrock-common/src/main/java/com/nukkitx/protocol/bedrock/data/event/PlayerDiedEventData.java

}

// Marshal ...
func (p *PlayerDiedEventData) Marshal(r IO) {
func (p *PlayerDiedEventData) Marshal(w *Writer) {
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think this compiles. Implementations of the protocol.EventData interface must (only) implement a Marshal(r IO) interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I didn't notice that

Copy link
Owner

@Sandertv Sandertv left a comment

Choose a reason for hiding this comment

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

Looks good, thank you for the PR!

@Sandertv Sandertv merged commit 6724e8e into Sandertv:master Aug 26, 2022
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.

None yet

2 participants